Workflow Studio input and output data variables
Summarize
Summary of Workflow Studio input and output data variables
Workflow Studio in ServiceNow uses variables to handle input and output data for actions, subflows, and flows. These variables store different types of data essential for building and managing workflows, allowing you to pass and manipulate data efficiently within your automation processes.
Show less
Key Features
- Input and Output Variables for Actions: Inputs appear as data pills in the Input Variables section, and outputs appear in the Output Variables section of the Data pane. Step input variables are not shown individually, but step output variables are accessible within the step context.
- Flow and Subflow Variables: Flow triggers and subflow inputs/outputs are displayed as data pills in respective sections of the Data pane. Action inputs within flows are not displayed separately, but outputs are visible as part of the actions.
- Data Pills: Each data pill includes a label and a data type description, and can be expanded to explore nested data elements, providing transparency into the structure of the data being handled.
- Supported Data Types: Workflow Studio supports a variety of data types to store ServiceNow AI Platform record data and complex data such as arrays and objects. Data types must match the source data’s ServiceNow AI Platform field type for records.
Data Types Supported
Commonly supported data types include:
- Approval rules: Conditions for approval processes.
- Arrays: Collections of Booleans, choices, datetimes, integers, objects, or strings.
- Choice and Conditions: Values for choice lists and condition sets tied to specific tables.
- Datetime, Integer, String, Boolean: Standard data formats for dates, whole numbers, text, and true/false values.
- File attachment: Stores a single file associated with a record within the action or flow.
- JSON: Stores JSON-formatted text useful for integrations and scripting.
- List.[Table], Records.[Table], Reference.[Table]: Store lists or single Sys ID references to records in specific tables, supporting field options like default records and reference qualifiers.
- Object: Stores JavaScript objects.
- Password (2 Way Encrypted): Securely stores encrypted passwords that can be decrypted.
- Table name: Stores alphanumeric table name strings from the database dictionary.
Practical Application for ServiceNow Customers
Understanding the input and output variables and their data types in Workflow Studio enables you to design precise and effective workflows by correctly handling the data flowing through actions, subflows, and flows. Proper use of data pills and matching variable data types ensures data integrity and optimizes workflow automation. This knowledge is critical when building custom actions and flows, helping you to leverage ServiceNow AI Platform capabilities fully.
Actions and subflows use variables to store input and output data. The variable data type determines what kind of data it stores and its advanced configuration options.
Data variables available for actions
The Workflow Studio UI displays action inputs as data pills in the Input Variables section of the Data pane. Action outputs are listed as data pills in the Output Variables section of the Data pane.
Workflow Studio does not display step input variables in the data pane. The output variables produced by each step are available in the data pane as part of the step that created them. For more information on using input and output variables to create a custom action, see Building actions.
Each data pill consists of a label and a data type description. For example, the Incident input variable uses the Record data type to store an incident Sys ID. The Problem output variable uses the Record data type to store a problem Sys ID. You can expand data pills to see the contents and hierarchy of any child elements.
Data variables available for flows and subflows
The Workflow Studio UI displays the flow trigger as a data pill in the data pane, and displays subflow inputs as data pills in the Subflow Inputs section of the Data pane. Subflow outputs are listed as data pills in the Subflow Outputs section of the Data pane.
Workflow Studio does not display action input variables in the data pane. The output variables produced by each action are available in the data pane as part of the action that created them. For more information on using input and output variables to create a flow, see Building flows.