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 

it's very simple.

pass the record sysId to custom flow action as input

then use that to query your table and you have the GlideRecord object of that record

💡 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

Yes,

In flow designer while using actions we have the option for toggle script there we can use fd_data object and write our script..

If this help please mark as helpful..

MaxMixali
Kilo Sage

Yes, Flow Designer can run custom scripts!Main Options:

 

Script Step (inline in flow) - Most similar to Workflow "Run Script"
Custom Script Action (reusable)
Script Include (called from Script Step)
Subflow with Script (for complex reusable logic)

 

yashkamde
Tera Contributor

Use a Script Step inside an Action

1) Go to Flow Designer → Actions

2) Create a new Action

3) Add a Script step

--> This allows running custom server-side JavaScript

--> You can define inputs & outputs

4) Save the Action

5) Use that Action inside your Flow