We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Is there any way to utilize scripting in a subflow ?

Gopi22
Tera Guru

Hi Everyone, 

 

I am interested to know if there is any way to utilize scripting in subflow without using a custom action for the same. What I need to do is, through scripting, return a value, and utilize that value across the subflow by accessing it through data pill. I am looking for a way to do this without using a custom action.

 

Any pointers will be helpful. 

 

Thanks,

Gopikrishnan

7 REPLIES 7

kristymerriam
Administrator

You could try scripting in a Flow Variable I suppose.

 

KristyMerriam_0-1736200915208.png

 

Set the value of the variable using the Set Flow Variables action that is located under Flow Logic.

 

KristyMerriam_1-1736200950572.png

 

 

What kind of value do you need to return from the script?

Thank you @kristymerriam 

 

Actually, the requirement for me was to parse a JSON payload and get specific parameter values from it and use it in FLOW. I defined an ACTION instead and did this activity. 

 

But from this post I did learn something new - FLOW VARIABLES - which is similar to Workflow scratchpad variable. I am sure this will be useful for me in the future.  Thank you! 

vermaamit16
Kilo Patron

Hi @Gopi22 

 

As suggested by @kristymerriam , you can create a flow variable and assign the value to it via Script. Can you please elaborate on your requirement so that we can assist you further ?

 

Thanks and Regards

Amit Verma

Thanks and Regards
Amit Verma

Thank you @vermaamit16 . I was able to proceed as mentioned above. I was trying to get particular parameters from a JSON payload.