How to get Execution ID of the current flow in the flow designer Servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 09:25 PM
I have a requirement to get and utilize the execution id of the current flow with trigger being REST-API asynchronous in flow designer. Please let me know some method to get the execution id of the current flow in the same flow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 10:34 PM
Hi @Parvathy B1,
I think you might get your answer here - ScriptableFlowRunnerResult | ServiceNow Developers
Please take a look at the getContextId() method.
Let me know if this was helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 09:45 PM
Hey @Parvathy B1
var sysID = FlowScriptAPI.getContextID();
Try above code in script step of action & call the action from flow, which will return the execution ID of current flow.
Result:
Regards,
Vishal