Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to get Execution ID of the current flow in the flow designer Servicenow

Parvathy B1
Tera Contributor

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.

2 REPLIES 2

Arpan Baishya
Kilo Sage

Hi @Parvathy B1,

 

I think you might get your answer here - ScriptableFlowRunnerResult | ServiceNow Developers

 

Please take a look at the getContextId() method.

 

ArpanBaishya_0-1693460004578.png


Let me know if this was helpful.

Vishal Salvi
Giga Contributor

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.

VishalSalvi_0-1693543244147.png

Result:

VishalSalvi_1-1693543298193.png

 

Regards,

Vishal