custom approval in flow designer

Deepika54
Tera Contributor

Hello experts, 

 

I am creating a flow designer in which in the output variable, i have comma seperated user's sysid's example

 
["904aa11993c322909fa4d2fbb9373c16","24206a0f93792e105f36bb697bba102a"]
I want to send an approval to all of the users that will be there in the output of the action which will hold the sysid's.
Can anyone tell me how to pass these values in the ask for approval in flow designer
2 ACCEPTED SOLUTIONS

Utpal Dutta
Tera Guru

Hi @Deepika54 ,

I think you've created a custom action from flow designer. In this case why don't you return output as list reference type rather than string so you can use it directly in your main flow where you're using "Ask approval" activity.

 

Please follow below steps to modify your action output:

  1. Set output variable in script action as list reference to user table.UtpalDutta_6-1767965471646.png

     

  2. In output create output variable of type list     again.UtpalDutta_3-1767964649822.png
  3. Click on exit edit mode and then set your output variable value with script step output value.UtpalDutta_4-1767964720796.png

 

Once your action is setup then go back to your main flow and use above action output directly in your approval action like below:

UtpalDutta_7-1767965607047.png

 

 

 

Above solution will also work if you're using a subflow which is returning comma seperated string.

 

If my answer helps then please mark it helpful & accept this solution.

 

Thanks,

Utpal

 

View solution in original post

@Deepika54 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

💡 If my response helped, please mark it as correct as well so that this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@Deepika54 

you can use scripted approvals

check this link which uses flow variable to handle this

Scripted Approvals in Flow Designer with Flow Variables 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Deepika54 

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! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Deepika54 

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! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Deepika54 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

💡 If my response helped, please mark it as correct as well so that this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader