Get started with dynamic inputs
-
- UpdatedJan 30, 2025
- 17 minutes to read
- Yokohama
- Create Workflows
Create a sample action that illustrates using all available types of dynamic inputs in a flow.
Before you begin
Procedure
Create credential and connection records for your instance
Create the aliases, connections, and credentials needed to connect to your local instance.
Before you begin
Role required: admin
Procedure
Result
You can use the Local Instance alias to connect to your local instance when configuring REST steps.
Create a data gathering action to get table names
Create a custom data gathering action to fetch a list of table names from the Table API.
Before you begin
Role required: action_designer or admin
About this task
- A REST step to gather table names from the REST Table API
- A script step to construct a JSON payload from the REST step's Response Body
- An action output variable named output to store table name and value pairs as a JSON document
This custom action uses a REST API call to duplicate the functionality of the ServiceNow core Look Up Record action and Look Up Records action. Typically, you do not need to create custom actions to perform basic record operations. This action illustrates working with the REST and Script steps to gather table data for dynamic inputs.
Procedure
Create a data gathering action to get field names
Create a data gathering action to get a list of fields from a table.
Before you begin
Role required: action_designer or admin
About this task
- A REST step to gather fields from the REST Table API
- A script step to construct a JSON payload from the REST step's Response Body
- An action output variable named output to store field name and value pairs as a JSON document
This custom action uses a REST API call to duplicate the functionality of the ServiceNow core Look Up Record action and Look Up Records action. Typically, you do not need to create custom actions to perform basic record operations. This action illustrates working with the REST and Script steps to gather field data for dynamic inputs.
Procedure
Create a data gathering action to add dynamic inputs
Create a data gathering action to add a reference type dynamic input.
Before you begin
Role required: action_designer or admin
About this task
- An action input variable to store a table name
- A script step to construct two dynamic inputs as a JSON object
- An action output variable named output to store the dynamic inputs
This custom action uses a reference type input to duplicate the functionality of the ServiceNow core Look Up Record action and Look Up Records action. Generally, you don’t need to create custom actions to perform basic record operations. This action illustrates working with the Script steps to gather field data for dynamic inputs.
Procedure
Create a custom action to test dynamic inputs
Create a custom action to test dynamic inputs.
Before you begin
About this task
This helper action duplicates the functionality of the Create Record step to illustrate gathering data from a REST step. Generally, you use dynamic inputs for integrations to third-party systems and data.
- An input of type Dynamic Choice to select a table
- An input of type Dynamic Template to select and set field values
- A script step to create a record from the GlideRecord - Global
- An action output variable named output to store the sys_id of the record created
Procedure
Result
On this page
Related Content
- Create a data gathering action for a dynamic choice
Create a data gathering action to generate a list of choice options for a dynamic choice input.
- Create a data gathering action for a dynamic template
Create a data gathering action to collect record field values for a dynamic template input.
- Create a data gathering action for a dynamic inputs type input
Create a data gathering action to create arbitrary action inputs using a dynamic inputs type input.
- Dynamic input configuration options
Use these options to configure dynamic inputs.