Suspend Node
Control workflow timing with flexible suspension modes for approvals, delays, and event-driven resumption
Suspend Node
The Suspend node pauses workflow execution and resumes based on specified conditions. It supports time-based suspension, duration delays, and integration event-driven resumption, making it essential for approval workflows and human-in-the-loop processes.
Configuration
Input Schema
The Suspend node accepts one of three suspension modes:
Integration Mode
Field | Type | Required | Description |
---|---|---|---|
type | string | Yes | Must be "integration" |
integrationId | string | Yes | ID of integration to monitor for events |
filterPrompt | string | Yes | Prompt to filter which events resume workflow |
Until Mode
Field | Type | Required | Description |
---|---|---|---|
type | string | Yes | Must be "until" |
until | string | Yes | ISO datetime when workflow should resume |
Duration Mode
Field | Type | Required | Description |
---|---|---|---|
type | string | Yes | Must be "duration" |
duration | string | Yes | ISO 8601 duration (e.g., "PT1H30M", "PT5M") |
Output Schema
Field | Type | Description |
---|---|---|
suspendType | string | The type of suspension used |
resumeAt | string | ISO datetime when workflow will resume (optional) |
Basic Usage
Simple Time Delay
- id: wait_5_minutes
type: suspend
input:
type: "duration"
duration: "PT5M"
Schedule for Specific Time
- id: wait_until_midnight
type: suspend
input:
type: "until"
until: "2024-12-31T23:59:59Z"
Wait for Integration Event
- id: wait_for_approval
type: suspend
input:
type: "integration"
integrationId: "slack-approval-bot"
filterPrompt: "Resume when message contains 'APPROVED' from manager"
Advanced Examples
- id: submit_for_approval
type: http
input:
url: "{{ approval_api }}"
method: "POST"
body:
request: "{{ approval_request }}"
requester: "{{ user.id }}"
- id: wait_for_approval
type: suspend
input:
type: "integration"
integrationId: "approval-system"
filterPrompt: "Approved by manager with ID matching {{ user.managerId }}"
- id: process_approved_request
type: condition
input:
if: true
then: ["execute_approved_action", "notify_success"]
else: []
Human-in-the-loop workflow that pauses execution until external approval is received through integrations.
- id: collect_daily_data
type: http
input:
url: "{{ data_api }}/daily"
- id: wait_for_next_day
type: suspend
input:
type: "until"
until: "{{ tomorrow_at_midnight }}"
- id: process_batch
type: loop
input:
forEach: "{{ collect_daily_data.output }}"
configuration:
mode: "parallel"
Schedule workflows to run at specific times, perfect for daily reports, batch processing, or maintenance tasks.
- id: process_items
type: loop
input:
forEach: "{{ items_to_process }}"
configuration:
mode: "sequential"
- id: api_call
type: http
input:
url: "{{ rate_limited_api }}"
body: "{{ item }}"
- id: respect_rate_limit
type: suspend
input:
type: "duration"
duration: "PT1S" # 1 second delay between calls
Respect API rate limits by adding delays between requests to avoid hitting usage quotas.
- id: technical_review
type: suspend
input:
type: "integration"
integrationId: "github-reviews"
filterPrompt: "Technical approval from engineering team lead"
- id: business_review
type: suspend
input:
type: "integration"
integrationId: "slack-approvals"
filterPrompt: "Business approval from product manager"
- id: final_approval
type: suspend
input:
type: "integration"
integrationId: "executive-approval"
filterPrompt: "Executive sign-off for deployment"
- id: deploy_changes
type: http
input:
url: "{{ deployment_api }}"
method: "POST"
Implement complex approval chains with multiple stakeholders and different approval systems.
- id: check_system_load
type: http
input:
url: "{{ monitoring_api }}/load"
- id: conditional_delay
type: condition
input:
if: "{{ check_system_load.output.cpu > 80 }}"
then: ["wait_for_low_load"]
else: ["proceed_immediately"]
- id: wait_for_low_load
type: suspend
input:
type: "duration"
duration: "PT10M" # Wait 10 minutes during high load
Dynamically delay execution based on system conditions, perfect for load management and resource optimization.
Duration Format Reference
# Minutes
duration: "PT5M" # 5 minutes
duration: "PT30M" # 30 minutes
# Hours
duration: "PT1H" # 1 hour
duration: "PT2H30M" # 2 hours 30 minutes
# Seconds (rounded up to next minute)
duration: "PT30S" # 30 seconds (becomes 1 minute)
duration: "PT90S" # 90 seconds (becomes 2 minutes)
# Complex durations
duration: "PT1H15M" # 1 hour 15 minutes
duration: "PT45M" # 45 minutes
Follow ISO 8601 duration format for consistent, machine-readable timing.
# Good: Clear, human-readable
duration: "PT5M" # 5 minutes
duration: "PT1H" # 1 hour
# Avoid: Overly complex
duration: "PT1H23M45S" # Too precise, rounds to minutes anyway
Keep durations simple and readable since seconds are rounded up to the next minute anyway.
Error Handling
Timeout Management
- id: timed_approval
type: suspend
input:
type: "integration"
integrationId: "approval-system"
filterPrompt: "Approval from authorized user"
configuration:
timeoutMs: 3600000 # 1 hour timeout
- id: handle_timeout
type: condition
input:
if: "{{ timed_approval.timedOut }}"
then: ["escalate_approval", "notify_timeout"]
else: ["process_approval"]
Fallback Mechanisms
- id: primary_approval
type: suspend
input:
type: "integration"
integrationId: "primary-approver"
filterPrompt: "Approval from primary manager"
configuration:
timeoutMs: 1800000 # 30 minutes
- id: backup_approval
type: suspend
input:
type: "integration"
integrationId: "backup-approver"
filterPrompt: "Approval from backup manager if primary unavailable"
Best Practices
Last updated on