Login
Free Sign Up
Docs
/

Flow - Cancel

Type identifier: flow:cancel Category: 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.

Input Handles

Handle

Data Type

Required

Description

trigger

trigger

Yes

Execution trigger input

flowExecutionId

string

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 flowExecutionId output when scheduling
    • Must reference a valid run of the specified Flow

Output Handles

Handle

Data Type

Description

success

trigger

Emitted when cancellation succeeds

error

trigger

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

label

string

Yes

"Flow - Cancel"

Display label for the node

flowId

string

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 flowExecutionId input must reference a run of this specific Flow

Behaviour

Execution Flow

  1. Node receives trigger on the trigger input handle
  2. Resolves the flowExecutionId input value
  3. Validates that flowExecutionId is a valid string
  4. Triggers appropriate output handle based on result

Success Path

When cancellation succeeds:

  • Output handle success is triggered
  • A log entry is created: "cancelled flow execution"

Error Path

When cancellation fails:

  • Output handle error is triggered
  • Error result is set with a descriptive message

Edge Cases

Scenario

Behaviour

Missing flowExecutionId

Error: "flowExecutionId is a required string"

Invalid flowExecutionId type

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)