Trigger flow from a workflow in scope

Nora3
Kilo Expert

Hi!

I was wondering if it's possible to trigger a flow from a workflow (the flow and the workflow is in the same scope as I am working in). How can I run a flow in the workflow?

 

Thanks.

 

1 ACCEPTED SOLUTION

siva_
Giga Guru

Hello Nora, 

 

Here is the blog shared by Dave , which would help you to call a flow from a server side script, As you say that you wanted to call a flow from a workflow , the API shared by Dave which is introduced in London Release Of servicenow Should help you achieve your requirement. 

Note : Only available for instances in London or newer versions .

 

Thanks,

Siva 

 

Mark this response as correct/helpful if that really helps

 

View solution in original post

6 REPLIES 6

siva_
Giga Guru

Hello Nora, 

 

Here is the blog shared by Dave , which would help you to call a flow from a server side script, As you say that you wanted to call a flow from a workflow , the API shared by Dave which is introduced in London Release Of servicenow Should help you achieve your requirement. 

Note : Only available for instances in London or newer versions .

 

Thanks,

Siva 

 

Mark this response as correct/helpful if that really helps

 

MattiasJonsson
ServiceNow Employee
ServiceNow Employee

From your published/activated flow, click the three dots top right and choose the "Copy Snippet" option. Copy the Server side code.

find_real_file.png

 

In Workflow, drag a new "Run Script" action to your Workflow and past the copied code in the Script box.

find_real_file.png

 

 

If helpful or correct please indicate so

find_real_file.png

Hi,

Thank you for answering. The option "code snippet" is not visible for me. I tried to elevate roles to security admin but I still couldn't see this choice.

I can see this option in my New York Instance. Might be this is a new addition in this release. There is no need of any elevate roles that need to be done to make this visible. 

Its just that your needs to be a active one. 

 

Mark this answer as helpful if that really helps 

 

Thanks,

Siva