Trigger flowdesigner based on UI action

Kri
Kilo Sage
I have a UI action called ‘Aha’ in Requested item table. When I click on it, it should trigger the Flow action. How can I configure this? I’m looking for a step‑by‑step setup.
3 REPLIES 3

Dr Atul G- LNG
Tera Patron

Hi @Kri 

https://www.servicenow.com/community/developer-forum/how-to-trigger-a-flow-from-a-ui-action/m-p/2162...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0869563

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Greetings @Kri. The only thing I'd like to add to @Dr Atul G- LNG's amazing comment is some screenshots of how ServiceNow generates a Code Snippet for you to copy and paste into your UI Action. 

 

  • Navigate to either Flow Designer or the new Studio.
  • Click on the Actions tab / pill
    lpruit2_1-1770484696536.png

     

  • Select the Flow Action you wish to call from your UI Action. In my example, I picked the "Add Comment" Flow Action
  • Within the Flow Action, navigate over to the upper right of the screen to the More Actions menu icon. In the menu that is displayed, select Create code snippetlpruit2_2-1770484868509.png

     

  • A pop-up will then display that says Code snippet to execute this Action. Click the blue Copy Code Snippet to Clipboard button at the bottom of this pop-up. 

 

Finally, all that will be required after that is to map any inputs for the Flow Action from the UI Action into the generated code snippet. 

 

I hope this information is helpful! 

DineshK08446206
Tera Guru

Hi @Kri ,

After your flow designer flow is activated, click on 3dots symbol on the top right of the flow designer and click on create code snippet and copy that code and paste that code in the UI Action

If my response helped, mark it as helpful and accept the solution