Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Is there any functionality in flow to run custom script as Run script activity in workflow ?

1_DipikaD
Kilo Sage

Hi All,

 

Is there any functionality in flow to run custom script as Run script activity in workflow ? When condition matches I want to trigger a script in flow designer. 

 

Thank You

1 ACCEPTED SOLUTION

@1_DipikaD 

you can add 2 script steps in same custom action or have 2 custom actions with 1 script step in each of those

it's as per your customer requirement.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

23 REPLIES 23

@1_DipikaD 

no we can't use current object in Flow action script.

pass the record sysId as input to flow action, then in script step query that table with that sysId and then use that GlideRecord object

I believe I answered your original question.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

I was configuring as you suggested but not sure why there is no option is coming to select in data pill. Can I try to pass through script ? Could you please help with the script ?

Thank You

@1_DipikaD 

what type of variable is that?

if list collector then it won't work that way.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,

Yes it's a list collector.

Any other method we can use ?

@1_DipikaD 

Step 4 is OOTB action or custom flow action?

what are you trying to pass to that action?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader