- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am trying to trigger approvals in my Flow, but I am unable to pass the sys_id in the “Ask for Approval” activity.
Use case:
I have created a custom action that fetches the approver’s sys_id based on certain conditions. The approvals are dynamic, and I am able to retrieve the approval record successfully.
However, when I pass this approval sys_id into the “Ask for Approval” activity, it is not being accepted and throws an error (see screenshot below).
Could someone please help me understand how to correctly pass the approval record into the “Ask for Approval” activity? Any help would be greatly appreciated.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
use inline script and access the output from action
Scripted Approvals in Flow Designer with Flow Variables
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
use inline script and access the output from action
Scripted Approvals in Flow Designer with Flow Variables
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Ankur Bawiskar ,
Thank you so much for the help. It is working perfectly fine now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @MDRaheem ,
You passing sys_id directly in Ask for approval will not help, instead of this you need to wrap that in the string like :
outputs.result = "ApprovesAnyU[" + sys_id + "]"while passing result in custom action :
And then pass the output of action into flow designer Ask for approval :
Also your custom Action Output should look like this then this will work :
If my response helped mark as helpful and accept the solution.

