Is there any way to utilize scripting in a subflow ?

Gopi22
Giga 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

Kristy Merriam
Administrator
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 @Kristy Merriam 

 

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! 

Amit Verma
Kilo Patron
Kilo Patron

Hi @Gopi22 

 

As suggested by @Kristy Merriam , 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


Please mark this response as correct and helpful if it assisted you with your question.

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