Use the nested workflow operator to make complex workflows easier to read, more efficient, and simpler to maintain. It lets you break down big workflows into smaller, reusable parts (subroutines).
Important to Know
Nested workflows are triggered by the parent workflow and require the On-demand trigger. Set the Triggered from toggle:
Anywhere: The workflow can be triggered from the designer or external sources such as Slack, and is also available as a nested workflow. The workflow counts toward the workspace workflow quota.
Nested only: This workflow is just for use within other workflows. The workflow counts toward the workspace nested workflow quota.
A published parent workflow runs the published version of nested workflows (unless an ID of a different revision was specified). If the parent workflow is a draft, it uses the latest version of the nested workflow, whether it's published or still a draft.
Nested workflow executions generate an activity log entry with the parent workflow as the event source.
Create a Nested Workflow
Create a Nested Workflow
To create a nested workflow, you can:
Edit a Nested Workflow
Edit a Nested Workflow
To test a draft version of a nested workflow, the parent workflow must also be in draft mode. If the parent workflow is published, it'll use the nested workflow's published version.
Here's what to do:
Switch the parent workflow to draft mode.
Make changes to the nested workflow.
To test, manually start the parent or nested workflows.
View the List of Dependent Workflow
View the List of Dependent Workflow
When you edit a workflow, first check which workflows depend on it to avoid issues. Here’s how:
Click View Affected Workflows to see which workflows (parent workflows) might be impacted by your edits.
If there are several layers of nested workflows, check each level similarly.
Update any workflows that need changes because of your edits.
Test the changes by running the workflows. If testing a draft version, ensure the parent workflow is also in draft mode.
Once everything works, publish the updated workflows.
Execution Options
Execution Options
Here are some settings you can change for a nested workflow:
Ignore failure: By default, if a nested workflow fails, the parent workflow stops and shows a failure. If you choose Yes, the parent workflow will keep running even if there's a problem with the nested workflow.
Wait for output: By default, the parent workflow waits until the nested workflow is done to continue. If you select No, both workflows will run at the same time. However, the main workflow might not get the results from the nested workflow right away.
Example: How to Set Up and Use Nested Workflows
Example: How to Set Up and Use Nested Workflows
1. Creating a Nested Workflow:
A nested workflow is a regular workflow with an on-demand trigger. In this example, the nested workflow will enrich an IP address.
On the Workflows page, click Create Workflow.
Give the workflow a meaningful name, such as IP Enrichment.
Select the On Demand trigger and click Create Workflow.
Select the trigger to add input parameters for passing the required data from the parent workflow to the nested workflow. This example uses a short-text field titled IP Address as the workflow aims to enrich an IP address.
Implement the logic to enrich the IP address. Access the IP address by using:
{{ $.event.ip_address }}
Add the Exit operator and define the workflow output. This output will be accessible in the parent workflow upon the completion of the nested workflow execution.
2. Using the Nested Workflow in a Parent Workflow:
The parent workflow executes the nested workflow as part of its logic, providing the necessary information and using the output in subsequent steps.
Create the parent workflow and implement the required logic.
Add the Workflow operator.
Select a workflow to call as a nested workflow.
Provide the values for the nested workflow input parameters.
Access the nested workflow output in subsequent steps by using:
{{ $.<nested_workflow_name>.<output_structure> }}