Dynamic outputs

  • Release version: Zurich
  • Updated July 31, 2025
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Dynamic outputs

    Dynamic outputs in ServiceNow enable flow designers to access action and subflow outputs as dynamically generated data pills during flow design. This feature allows the creation of complex data gathering actions that retrieve structured data from ServiceNow AI Platform and Integration Hub outputs. Dynamic outputs provide flexibility by exposing data schemas dynamically rather than relying on hard-coded values.

    Show full answer Show less

    Note that dynamic outputs are not available in the base system and require the ServiceNow Flow Designer - Introspection [com.glide.hub.flowdesignerintrospection] plugin, which must be requested to use in Workflow Studio.

    Key Features

    • Data Gathering Actions: These are special actions designed to collect data, commonly from third-party systems via REST calls. They produce JSON output with a schema that is dynamically interpreted during flow design.
    • Dynamic Objects: Instead of hard-coding output structures, dynamic objects can be created as complex objects or arrays, structured dynamically by data gathering actions.
    • Timeout Configuration: Data gathering actions have a default timeout of 300 seconds to complete before stopping. This timeout can be adjusted globally with the snflowdesigner.syncactionexecutiontimeoutinseconds system property.
    • Scripting Requirements: Data gathering actions use script steps to generate JSON output formatted with a data property. Only one JSON output is allowed per action. Scripting errors can disrupt output generation and trigger warning messages.
    • Output Limits: When used for dynamic choices or templates, JSON outputs should not exceed 5000 options or template values to ensure proper display.
    • Integration Focus: Dynamic outputs are especially useful for integrating third-party systems and calling external APIs during flow design, enhancing flexibility and data retrieval capabilities.

    Practical Considerations for ServiceNow Customers

    • To implement dynamic outputs, action designers must create data gathering actions that collect and expose JSON-formatted data.
    • Parent actions use dynamic outputs that point to these data gathering actions, allowing flow designers to add them to flows and access dynamic data pills.
    • Long data retrieval times should be managed carefully — avoid excessive timeouts in interactive flows where users expect quick responses.
    • Review and test scripts thoroughly to prevent errors that could block output data generation.

    Getting Started

    To begin using dynamic outputs, create a data gathering action that builds the dynamic object, then create a parent action that uses the dynamic output pointing to this data gathering action. This enables flows to consume complex, dynamically generated data structures effectively within Workflow Studio.

    Access action and subflow outputs as dynamically generated data pills during flow design. You can also build data gathering actions to generate complex objects from ServiceNow AI Platform and Integration Hub outputs.

    Note:
    Dynamic outputs are not available in the base system. To use dynamic outputs in Workflow Studio, you must Request an Integration Hub plugin. Dynamic outputs are part of the ServiceNow Flow Designer - Introspection [com.glide.hub.flow_designer_introspection] plugin.

    During the flow design, a dynamic output retrieves the complex object's schema values and displays them as data pills in the data panel.

    A dynamic output must point to a data gathering action that collects the displayed data. For example, a data gathering action can retrieve values from a third-party system as part of an Integration Hub spoke. To use a dynamic output in Workflow Studio:
    1. An action designer creates a data gathering action.
    2. An action designer creates a parent action with a dynamic output that points to the child data gathering action.
    3. A flow designer adds the parent action to a flow.

    Data gathering actions

    A data gathering action collects data to be used by other actions. Data gathering actions are intended to be called from dynamic inputs rather than be added directly to a flow. Data gathering actions typically collect data from third-party systems using a REST call. All data gathering actions must meet these requirements and constraints.
    • The action has a script step that contains an output variable of type JSON.
    • The action has an output named output of type JSON whose value is derived from the script step's JSON output variable.
      Note:
      The action can have multiple outputs but can only have one of type JSON.
    • The script step formats the JSON output to have a property named data.
    • The JSON output should not return more than 5000 choice options, field template values, or array element items when the data is intended for a dynamic choice or a dynamic template input.
      Note:
      Dynamic choice and dynamic template inputs can only display up to 5000 choice options or 5000 template values from the JSON output.
    • The action waits for up to 300 seconds (5 minutes) to gather data before it times out.
      Note:
      To change the timeout period for all actions, modify the value of the sn_flow_designer.sync_action_execution_timeout_in_seconds system property.

    Dynamic object

    A dynamic object is either a complex object or an array of complex objects. Action designers build the object structure dynamically with a data gathering action rather than hard-coding it. For more information on building a dynamic object, see Create a data gathering action for a dynamic object.

    General guidelines

    Use dynamic outputs for third-party integrations
    Use dynamic outputs to introspect and fetch data from external systems during the flow design. For example, you can specify service endpoints or call actions that interact with specific endpoint APIs. For more information on setting up third-party integrations with Workflow Studio, see IntegrationHub.
    Note the time that is required to retrieve large amounts of data
    By default, dynamic outputs have up to 300 seconds to gather data before the system stops them. If your data gathering action needs more time to gather data, set the sn_flow_designer.sync_action_execution_timeout_in_seconds system property to a greater value. Avoid long timeout values for interactive flows where an end user is expecting to enter or select a value.
    Be aware of scripting errors
    Because all data gathering actions use a script step, potential errors could occur from scripting. Review any scripts that are used to output JSON variables because script errors may prevent the outputs from receiving the JSON values that they need. When a dynamic output scripting error occurs, the following warning message may appear.
    Figure 1. Message that is displayed for scripting error
    Dynamic action error message