Flow Action with Wait and Retry features
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 12:52 AM
Hi there,
I'm planning to create a custom Flow Action that runs once. If it fails, it should wait for 4 hours and then retry once more. If it still fails after the retry, it should return a failure output. the number of retry should be configurable.
However, I'm struggling with how to implement the 4-hour wait and how to loop within the Action.
Any suggestion to overcome these problems?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 01:43 AM
Create a flow variable for the number of retries. Depending on where you want to 'configure' this, you can do it in the flow itself, use system properties, or some field on a record and just do a lookup to is.
You can then add a counter variable to count the number of times the action is called and stop is when your counter has reached the set variable.
This can be set with the 'do the following until' flow logic. Your 'until' is the successful run or the number of retries and your 'do the following' is the wait action and the custom flow action.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 02:05 AM - edited 06-13-2025 02:05 AM
As your requirement is dynamic and Custom Flow action will not be suitable because "Do the fallowing until" action is not available in Custom actions.
So suggest to create the flow as per screen shot and use it as Sub Flow when ever required. Create variable and use it Until condition to manage the iterations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 02:07 AM
you can follow approach shared by @Mark Manders
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader