How we can initiate a flow from ui action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2025 06:05 AM
Hi Team,
How can we initiate a flow using ui action I tried below, but it's not working.
ui action script -runs on serviceside
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 03:36 AM - edited 05-09-2025 03:59 AM
Hi Ankur
flow is published
so i need to use the provided script in ui action script right?
after that do i need do i need to add or modify anything in flow?
scope:
Basically once's the ui action clicked then the flow should trigger i tested flow using test option manually the flow is working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 03:38 AM
use create code snippet, get that code and add that in UI action
update your script with the correct inputs
We don't know your sub-flow is in global or some other scope and also the name of the inputs.
So you are the best judge here.
I just shared show the UI action script might look like, please enhance it further
I believe I have answered your question
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 03:49 AM - edited 05-09-2025 05:32 AM
Hi Ankur
i am getting below log
var ritmNumber = current.number; gs.log("inputsvalue0" + ritmNumber)
but json structure log is not coming for RIM its empty
gs.log("inputsvalue" + JSON.stringify(inputs));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2025 11:21 PM
what came in log?
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 03:40 AM
You can just put the copied code snippet in ui action. That's it.