FlowScriptAPI - Scoped

concept australia Updated Sep 10, 2026 1 min read FlowScriptAPI.md
Raw file servicenow.com

The FlowScriptAPI API provides a method to return the context ID of the running flow.

You cannot instantiate objects of this type. Objects of this type are created automatically and are accessible only in script steps and inline scripts.

Parent Topic:Server API reference

FlowScriptAPI - getContextID()

Returns the context ID of the running flow.

Name Type Description
None
Type Description
String The sys_id of the running flow.

This example assumes you have created a flow containing a Log action. This inline script generates the content of the Log message.

JavaScript
var contextId = FlowScriptAPI.getContextID();return contextId;

Output:

Text
4ecead85c4da0010598d0c7c6bf73554
Search documentation
Search document titles and file paths on the australia branch