How to include script action in flow designer

Shuvaday1
Tera Contributor

Hi All
I am try to call a script include from flow design.I am quite new in this front,can some please help?

Also,I am seeing the code snippet(from more action) is disabled.Can someone please tell what I am missing out?

 

find_real_file.png

Thanks in advance.

3 REPLIES 3

SumanthDosapati
Mega Sage
Mega Sage

Hi,

You can create a script step.

Check this link from ServiceNow developer site.

 

Mark as correct and helpful if it solved your query.

Regards,
Sumanth

@Shuvaday 

Feel free to reach out if you have further questions or else you can mark an answer as correct and helpful to close the thread so that it benefits future visitors also.

Regards,
Sumanth

Mahendra RC
Mega Sage

Hello Shuvaday,

If you want to call this script include multiple times in flow or need to use in different flow then you can create a new action using the script step.

If your requirement is to use the script include only 1 time than I would suggest to use the flow variable and set the flow variable value with the output that your script include will return.

find_real_file.png

You can then use the Set Flow Variable Flow logic as shown below to call the script include:

find_real_file.png

Please mark this as helpful/correct, if it answer your question.

Thanks