Flow designer as Scheduled Job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:38 PM
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.
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:49 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:12 PM
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
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:28 PM
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....