Flow Designer: Script step not returning outputs

cs2022diatm
Tera Contributor

 

  • What I tried:
    - Used a Script step inside a Flow Designer flow
    - Defined outputs using outputs.name= value`

    What happened:
    - Flow runs, but outputs are not visible in the next step
    - No error in logs, but data doesn’t pass through

     

 

3 REPLIES 3

Brad Bowman
Kilo Patron

As there is not a 'Script step' on Flow Designer Flows or Subflows, I assume you're referring to an Action.  If you are using outputs.name in a script step within a custom Action, you need to also define an Output Variable with that same name and the appropriate type

BradBowman_0-1767722833937.png

If you want to view this value in the Flow or Subflow which called the Action, you must also create an Action

Output

BradBowman_1-1767723010894.png

then assign a value to the Action Output (using the data pill from the Script step Output variable

BradBowman_2-1767723112451.png

 

 

Maheshwari Mano
Tera Contributor

Hi @cs2022diatm ,

 

Make sure there are no errors in your script by testing it in a Background Script or by adding logs at appropriate places.

Follow these steps in your Flow Action:

  1. In the Script step, ensure the output variable is created in the Outputs section with the correct type.
  2. Assign the value directly to the outputs object, for example: outputs.result = 'XXXXX';
  3. In the Action Output step, create an output variable and map the result from the Script step by dragging and dropping the corresponding data pill from the right-hand pane.

 

MaheshwariMano_2-1769781643413.png

 

 

 Remember to remove any logs once the issue is resolved.

Utpal Dutta
Tera Guru

Hey @cs2022diatm ,

I think you're taking about inline script. If yes, then you don't need to set output or anything just write "return varaible_name" and that's it. 

 

Refer to screenshot below:

Screenshot 2026-01-30 at 10.14.57 PM.png

If you find my answer helpful then please mark it helpful & accept this solution.

 

Thanks,

Utpal