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.

Flow designer as Scheduled Job

JohnnySnow
Kilo Sage

Hi Team,

 

I've created a flow which has the trigger set as below, this would essentially work as a scheduled job.

However, I was wondering if there is any easier way of executing this flow on-demand, like the option "Execute Now" in scheduled job.

 

JohnnySnow_0-1732250270875.png

 

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.
3 REPLIES 3

RohitRR
Tera Contributor

Hi Jonney,

 

I would recommend you to create Flow custom action instead of Scheduled Flow Designer(Trigger as Daily). You can trigger the action using script.

 

Many thanks,

Uday Gadiparthi

Runjay Patel
Giga Sage

Hi @JohnnySnow ,

 

You can use below script to execute the flow manually.

sn_fd.FlowAPI.startFlow('global.flowName', inputs);

 

You can use this in UI action to trigger anytime while clicking on button.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

 

 

In this video i have explained about Web service integration in ServiceNow like how it works, how we can configure it, what are the prerequisite and many more. I have covered below topics in this video. 1. understand Web Service. Like when and how we will use it. 2. Talked about Inbound and ...

Sohail Khilji
Kilo Patron

Hi @JohnnySnow ,

 

if you already have a long flow created i would recommend using scheduled script to call the flow to execute on demand.

 

The below function will allow you to kick the flow ondemand on a scheduled script with execute now button.

sn_fd.FlowAPI.startFlow();

 

else:

if your starting of then i would recommend to use scheduled job instead, because Flow do not have option to trigger it ondemand.

 

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect