Flow - Cancel
Type identifier:
flow:cancelCategory: Flow Operations
Description
Cancels a running or scheduled Flow run. Use this node to stop a previously scheduled Flow from running, or to terminate an in-progress run.
Cancelling an in-progress run stops its active work, including any nested runs started by a Flow - Execute node.
Input Handles
Handle | Data Type | Required | Description |
|---|---|---|---|
|
| Yes | Execution trigger input |
|
| Yes | The ID of the run to cancel |
Input Handle Details
flowExecutionId
- Type:
string(CUID2 format) Notes:
- Typically obtained from a Flow - Execute node's
flowExecutionIdoutput when scheduling - Must reference a valid run of the specified Flow
- Typically obtained from a Flow - Execute node's
Output Handles
Handle | Data Type | Description |
|---|---|---|
|
| Emitted when cancellation succeeds |
|
| Emitted when cancellation fails |
Output Handle Details
error
When the error handle is triggered, an error object is available with the following structure:
{
message: string; // Description of what went wrong
}Configuration Options
Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
| Yes |
| Display label for the node |
|
| Yes |
| CUID2 of the Flow to cancel |
Configuration Details
flowId
- Type:
string(CUID2 format, 25 characters) - Validation: Must reference an existing Flow in the current Space
Notes:
- Select from the Flow picker in the node configuration
- The
flowExecutionIdinput must reference a run of this specific Flow
Behaviour
Execution Flow
- Node receives trigger on the
triggerinput handle - Resolves the
flowExecutionIdinput value - Validates that
flowExecutionIdis a valid string - Triggers appropriate output handle based on result
Success Path
When cancellation succeeds:
- Output handle
successis triggered - A log entry is created: "cancelled flow execution"
Error Path
When cancellation fails:
- Output handle
erroris triggered - Error result is set with a descriptive message
Edge Cases
Scenario | Behaviour |
|---|---|
Missing | Error: "flowExecutionId is a required string" |
Invalid | Error: "flowExecutionId is a required string" |
Run not found | Error: "failed to cancel flow execution: ..." |
Run already completed | Error: "failed to cancel flow execution: ..." |
Run already cancelled | Error: "failed to cancel flow execution: ..." |
Unexpected exception | Error handle triggered, exception logged |
Examples
Cancel a Scheduled Flow
{
"type": "flow:cancel",
"data": {
"label": "Cancel Scheduled Email",
"flowId": "clx1234567890abcdefghij"
}
}Input Handles:
trigger(trigger)flowExecutionId(string)
Output Handles:
success(trigger)error(trigger)