The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Flow not retrieving Output value from Flow Action

Markell
Tera Guru

Hi Guys

 

I have an issue with Flow Designer where by I created an action within a flow. 

I know the Action is receiving the correct input values as they show on the Step Configuration when I test:

Markell_0-1675701740564.png

I know that in my Action the script is working and producing the outputs that I need when I test the action 

Markell_1-1675701847542.png

But what is not working is that when I run the test on the overall flow (which is meant to use the output values to send an email) the flow execution reads that the "Email has no recipients".

Markell_2-1675701923986.png

 

When I look at the outputs in the flow execution for my action, in this instance there are no outputs:

Markell_3-1675701986676.png

 

Can anyone point me in the right direction as to why the Action will display correct info when I test the action but when I test the overall flow that the action is in, then the Outputs cannot be retrieved?

 

Kind Regards

 

Markell

 



 

1 ACCEPTED SOLUTION

Markell
Tera Guru

Hi Guys so got this sorted with SN Support. They advised that the issue doesn't seem to be a problem with the input data, but does appear to be a known new bug, discovered recently on a previous case, and referred me to this knowledge article.

The fix was to change part of my code to retrieve the input value from:
var value = inputs.request_item;
grReq.addQuery('sys_id',value.);
to
grReq.addQuery('sys_id',value.getUniqueValue());

 

"It seems to be an issue how the Reference is passed to the subflow as input."

 

Posting this in the hope it helps someone else in future as I did not know you had to use getUniqueValue() to get the sys_id to pass the value in a flow (and that this was a previously known issue).

 

Regards

 

Markell

View solution in original post

10 REPLIES 10

Johns Marokky
Tera Guru

Hi @Markell ,

Have you saved and published the action? Until the action is published the latest change will not be included in the flow.

Mark helpful if it helps in solving your query.

 

Regards,

Johns

Hi Johns. I have published the action before testing the flow

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

Looks like it's not just the email that's missing but also something in the subject, right? Possible reasons I can think of without seeing everything:

  • The user / role that runs the flow does not have the necessary access to execute whatever is in the Action, e.g. read certain records, execute certain scripts, etc.
  • The action is in a different scope and it is "simply" a cross-scope access issue.

You mind sharing your script as well?

Hi @Laszlo Balla thanks for the response. How can I check my actions Scope?  It should just be global as that is the scope I had open at the time of creating the flow