When to use
- Exit early when input validation fails before processing begins
- Stop processing when a duplicate record is detected
- End a branch when a condition makes further processing unnecessary
- Return meaningful error messages when business rules are violated
- Skip remaining steps when an optional process completes early
The Terminate node stops execution of the current branch only. Other parallel branches in the workflow continue to execute. When used inside a Sub Flow, it terminates only the sub flow while the parent workflow continues.
Actions
Going forward, use Terminate, Terminate Iteration, or Terminate Loop. The older Terminate with Error and Terminate with Success actions still work but are deprecated.
Terminate
Terminate
Terminates the workflow instance with a selected status. By default the instance is marked as terminated; enable the error or success toggle to mark it accordingly instead.
Output:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Termination Message | Text | No | — | Message to include with the termination. Supports templating. |
| Status Code | Number | No | 200 | HTTP status code for the termination response. |
| Status toggles | Toggle | No | Terminated | Toggle error or success to mark the instance with that status instead of the default terminated status. |
Terminate Iteration
Terminate Iteration
Terminates only the current iteration when running inside a Loop (or Pagination). Sibling iterations and the parent workflow continue. The iteration is marked as error by default; enable Terminate Iteration With Success to end it cleanly instead.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Termination Message | Text | No | — | Message to include with the iteration termination. Supports templating. |
| Terminate Iteration With Success | Toggle | No | false (error) | When enabled, the iteration ends with a success status instead of error. |
Terminate Loop
Terminate Loop
Terminates the entire loop. The loop is marked as error by default; enable the success toggle to end it cleanly instead.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Termination Message | Text | No | — | Message to include with the loop termination. Supports templating. |
| Terminate Loop With Success | Toggle | No | false (error) | When enabled, the loop ends with a success status instead of error. |
Terminate with Error (deprecated)
Terminate with Error (deprecated)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Error Message | Text | No | — | Error description to include with the termination. Supports templating. |
| Status Code | Number | No | 500 | HTTP status code representing the error type (e.g., 400, 404, 500). |
Terminate with Success (deprecated)
Terminate with Success (deprecated)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Success Message | Text | No | — | Success message to include with the termination. Supports templating. |
| Status Code | Number | No | 200 | HTTP status code representing success (e.g., 200, 201). |
Adding to your workflow
Add the Terminate node
In the workflow editor, click Add Node and select Terminate from the utility nodes section.
Select the action
Choose Terminate to stop the instance (toggle error or success as needed), or Terminate Iteration / Terminate Loop when inside a loop. The legacy Terminate with Error and Terminate with Success actions are deprecated.
Configure the message
Enter a descriptive message explaining why the workflow is terminating. Use templating to include dynamic values like
{{rule_node.body.validation_error}}.Set the status code
Enter an appropriate HTTP status code. Use 4xx codes for client errors (validation failures, not found) and 5xx for server errors. Use 2xx for successful early exits.
Examples
Input Validation for SAP Vendor Creation
Input Validation for SAP Vendor Creation
Validate required fields before creating a vendor in SAP. Terminate with a clear error if validation fails.Workflow Structure:Terminate node Configuration (False Branch):
Use Case: Prevents API calls to SAP with incomplete data, providing clear feedback about what’s missing.
- Start node - Receives vendor data
- Rule node - Check if required fields exist
- Terminate node (false branch) - Exit with validation error
- SAP node (true branch) - Create vendor
| Field | Value |
|---|---|
| Action | Terminate (error) |
| Termination Message | Missing required fields for vendor creation. Vendor name, tax ID, and country are required. |
| Status Code | 400 |
Duplicate Detection for NetSuite Contacts
Duplicate Detection for NetSuite Contacts
Check if a contact already exists before creating a new one. Terminate successfully if duplicate found.Workflow Structure:Terminate node Configuration (True Branch):
Use Case: Idempotent workflow that gracefully handles duplicates without creating errors in logs.
- Start node - Receives contact data
- NetSuite node - Search for existing contact by email
- Rule node - Check if contact exists
- Terminate node (true branch) - Exit successfully, contact exists
- NetSuite node (false branch) - Create new contact
| Field | Value |
|---|---|
| Action | Terminate (success) |
| Termination Message | Contact {{start.body.email}} already exists with ID {{netsuite_search.body.records[0].id}}. No action taken. |
| Status Code | 200 |
Tipalti Payment Authorization Check
Tipalti Payment Authorization Check
Sub Flow Early Exit Pattern
Sub Flow Early Exit Pattern
Use Terminate within a sub flow to exit early without affecting the parent workflow.Sub Flow Structure (Validation Sub Flow):
Parent Workflow Handling:
The parent workflow receives the sub flow’s termination status and can handle it with a Rule node:
- Start node - Receives data to validate
- Custom Code node - Run validation logic
- Rule node - Check validation result
- Terminate node (false branch) - Exit sub flow with error
- Response node (true branch) - Return validated data
| Field | Value |
|---|---|
| Action | Terminate (error) |
| Termination Message | {{custom_code.body.validation_errors}} |
| Status Code | 422 |
- True branch: Log error and notify operations
- False branch: Continue processing with validated data
Behavior details
| Scenario | Behavior |
|---|---|
| Downstream nodes | All nodes after Terminate in the current branch are skipped |
| Parallel branches | Other branches continue execution normally |
| Inside Sub Flow | Only the sub flow terminates; parent workflow continues |
| Inside Loop | Use Terminate Iteration to stop a single iteration or Terminate Loop to stop the whole loop. A plain Terminate stops the entire instance. |
| Workflow status | Both actions result in workflow execution status Success |
Troubleshooting
Terminate Not Stopping Workflow
Terminate Not Stopping Workflow
| Problem | Solution |
|---|---|
| Other branches still executing | Terminate only stops the current branch. Use Merge node before Terminate if you need to stop all branches. |
| Nodes after Terminate still running | Verify the Terminate node is correctly connected. Check that the node showing in logs is actually after the Terminate node in the flow. |
| Parent workflow continues after sub flow Terminate | This is expected behavior. Handle the sub flow’s termination status in the parent workflow with a Rule node. |
Message Not Appearing
Message Not Appearing
| Problem | Solution |
|---|---|
| Default message shown instead of custom | Verify the message field is saved. Check for templating syntax errors that might cause the field to be ignored. |
| Templating not resolving | Ensure referenced nodes have executed before Terminate. Use the correct syntax: {{node_name.body.field}}. |
Status Code Issues
Status Code Issues
| Problem | Solution |
|---|---|
| Status code not reflecting in API response | The status code is stored in the node output but may not affect the Workflow API HTTP response status. Use Response node if you need to control API response status. |
| Wrong default status code | Verify the selected status. The Terminate action defaults to 200; the deprecated Terminate with Error defaults to 500 and Terminate with Success to 200. |
Next steps
Rule node
Create conditional branches that lead to Terminate.
Response node
Return data before terminating via Workflow API.
Sub Flows node
Use Terminate for early exit in reusable workflows.