> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Execute workflow

The execute workflow node starts a child workflow from a parent workflow. The child runs through its workflow trigger, so you can share logic such as approvals or provisioning sequences across many workflows without duplicating nodes.

Beta

The execute workflow node and the workflow trigger are in beta and may change.

Add the node in the builder​

  1. Open the parent workflow in the workflow builder.
  2. Click the + button on the node you want to continue from, or click Add node.
  3. Under Flow controls, select Execute workflow.
  4. Select the new node to open its form, and configure it as described in Configure the node.

A new node starts with no workflow or trigger selected, an empty input, and Wait for completion turned on.

Configure the node​

SettingDescription
WorkflowRequired. The child workflow to run. Select from a searchable list of your organization's workflows, shown with their titles and icons. The current workflow is not in the list, because Port refuses to run a workflow that is already in the parent's chain of calls.
TriggerRequired. The workflow trigger of the child workflow to run through. The list shows only the workflow triggers of the selected workflow. When the child has exactly one, Port selects it for you.
InputA JSON object passed to the child workflow, available there as the output of its workflow trigger. Supports JQ templates and autocomplete. Leave it empty to pass {}.
Wait for completionWhen on (default), the parent node waits for the child run to finish before the workflow continues. When off, the parent continues as soon as the child run starts.
On failureShown only while Wait for completion is on. Choose Terminate (default) to fail the parent run when the child run fails, or Continue to let the parent continue.
Timeout (minutes)How long the node run can stay open before Port concludes it as timed out. Defaults to 1 day. See node timeout.

Like every node, you can also edit the title, icon, and description.

Behavior to know about​

  • Changing the workflow clears the selected trigger, so you never save a trigger that belongs to another workflow. Your input is kept.
  • Turning off Wait for completion clears On failure, because failure handling only applies while the parent waits.
  • Unpublished triggers appear in the list with an Unpublished tag. You can select one and save, but Port shows a warning, because the call fails until the child's trigger is published.
  • Workflows without a workflow trigger show the message "This workflow has no workflow trigger". Add a workflow trigger to the child workflow first.
  • Deleted or missing targets are shown as Deleted workflow or Missing trigger with the saved identifier, so you can see what is broken. If the selected workflow cannot be loaded, the trigger picker is disabled and shows an error.
  • Read-only access: if you cannot edit the workflow, the form is shown with every field disabled.

Configuration​

In the workflow JSON, the node's config has the following fields:

FieldTypeDescription
type"EXECUTE_WORKFLOW"Required. Must be "EXECUTE_WORKFLOW"
workflowIdentifierstringRequired. The identifier of the child workflow
triggerIdentifierstringRequired. The identifier of the child's WORKFLOW_TRIGGER node
inputobjectRequired. The input passed to the child workflow. Use {} for no input
waitbooleanWhether to wait for the child run to finish. Default: true
onFailure'continue' | 'terminate'What to do when the child run fails. Default: 'terminate'. Can only be set when wait is true
timeoutMinutesnumberOptional deadline for the node run, in minutes. Default: 1440 (1 day)
Explicit onFailure

When you save an Execute workflow node from the builder with Wait for completion on, Port writes onFailure explicitly, even when it was missing before. The saved config then states exactly what happens when the child run fails.

Example​

This node starts the provision-environment child workflow through its called-by-workflow trigger. The parent waits for the child to finish and continues even if the child fails:

{
"identifier": "provision_environment",
"title": "Provision environment",
"config": {
"type": "EXECUTE_WORKFLOW",
"workflowIdentifier": "provision-environment",
"triggerIdentifier": "called-by-workflow",
"input": {
"service": "{{ .outputs.trigger.service }}",
"environment": "production"
},
"wait": true,
"onFailure": "continue"
}
}

Next steps​