Wait

Pause workflow execution for a specified amount of time

Node Type

Control Flow

Category

Flow Control

Icon

Clock

Overview

The Wait node is a control flow node that pauses workflow execution for a configurable duration. This powerful timing control enables rate limiting, delays, and time-based workflow execution. Perfect for handling API rate limits, creating delays between actions, or implementing time-based business logic.

Key Features

  • Flexible Timing: Support for seconds, minutes, hours, and days
  • Rate Limiting: Perfect for API rate limiting and avoiding throttling
  • Business Hours: Wait for specific times or business hours
  • Debugging Support: Optional message logging during wait periods
  • Precise Control: Exact millisecond precision for timing
  • Workflow State: Maintains workflow context during wait periods

Prerequisites

Workflow Timing

Understanding of workflow execution timing

Clear understanding of when delays are needed in workflows
Knowledge of rate limiting and API constraints
Planning for time-based workflow execution

Time Unit Selection

Understanding of time units and durations

Duration Value: Positive number for the wait duration
Time Unit: Appropriate unit selection (seconds, minutes, hours, days)
Message Context: Optional message for debugging and logging

Technical Requirements

System capabilities needed

Workflow Engine: Support for pause/resume functionality
Time Conversion: Ability to convert time units to milliseconds
Execution Context: Proper handling of workflow state during wait periods

Node Configuration

Required Fields

duration

Type:number
Required:Yes
Value Type:positive number

How long to wait. Must be a positive number. The actual duration depends on the selected time unit.

unit

Type:dropdown
Required:Yes
Value Type:seconds, minutes, hours, days

The unit of time for the duration. Choose the most appropriate unit for your use case. Defaults to minutes.

Optional Fields

message

Type:text
Required:No
Value Type:string

Optional message to log during the wait. Useful for debugging and understanding workflow execution. Examples: 'Waiting for business hours...', 'Rate limiting API calls...'

Examples & Use Cases

API Rate Limiting

Wait between API calls to respect rate limits

{
  "duration": 1,
  "unit": "seconds",
  "message": "Rate limiting API calls to avoid throttling"
}

Waits 1 second between API calls to respect rate limits. Essential for working with APIs that have strict rate limiting policies.

Business Hours Delay

Wait until business hours before sending notifications

{
  "duration": 8,
  "unit": "hours",
  "message": "Waiting for business hours to send notification"
}

Waits 8 hours before sending notifications, ensuring they arrive during business hours. Perfect for time-sensitive business workflows.

Email Campaign Spacing

Space out email sends to avoid spam filters

{
  "duration": 5,
  "unit": "minutes",
  "message": "Spacing out email sends to avoid spam filters"
}

Waits 5 minutes between email sends to avoid triggering spam filters. Essential for email marketing automation.

Data Processing Delay

Wait for external systems to process data

{
  "duration": 30,
  "unit": "seconds",
  "message": "Waiting for external system to process uploaded data"
}

Waits 30 seconds for external systems to process uploaded data before proceeding. Common in data integration workflows.

Long-term Scheduling

Wait for extended periods (days) for scheduled tasks

{
  "duration": 7,
  "unit": "days",
  "message": "Waiting for weekly report generation"
}

Waits 7 days for weekly report generation. Perfect for long-term scheduling and recurring business processes.

Best Practices

Do's

  • Use appropriate time units for your use case (seconds for API delays, hours for business logic)
  • Add meaningful messages to help with debugging and workflow understanding
  • Consider API rate limits when setting wait durations
  • Use the output fields for logging and audit trails
  • Test wait times in development before deploying to production
  • Consider using shorter waits with loops for more flexible timing

Don'ts

  • Don't use extremely long waits (days) unless absolutely necessary
  • Avoid using wait nodes for real-time requirements
  • Don't forget to handle workflow timeouts for long waits
  • Avoid using wait nodes as a substitute for proper scheduling
  • Don't ignore the output fields for monitoring and debugging
  • Avoid hardcoding wait times without considering different environments
💡
Pro Tip: For complex timing requirements, consider using multiple Wait nodes with different durations rather than one very long wait. This provides more flexibility and better error handling. Use the output fields to log wait times and completion timestamps for better workflow monitoring.

Troubleshooting

Common Issues

Workflow Timeout

Symptoms: Workflow times out during wait period

Solution: Check your workflow timeout settings. For long waits (hours/days), ensure the workflow timeout is set appropriately or consider using scheduled workflows instead.

Incorrect Wait Duration

Symptoms: Wait duration doesn't match expected time

Solution: Verify the time unit selection. Remember that the duration is multiplied by the unit (e.g., 5 minutes = 5 * 60 * 1000 milliseconds). Check the output 'waitedFor' field to verify actual wait time.

API Rate Limiting Still Occurs

Symptoms: Still getting rate limited despite using wait node

Solution: Increase the wait duration or check if you're hitting multiple API endpoints. Some APIs have per-endpoint rate limits. Consider using longer waits or implementing more sophisticated rate limiting logic.

Workflow Execution Issues

Symptoms: Workflow doesn't resume after wait

Solution: Check workflow execution logs and ensure the workflow engine supports pause/resume functionality. Verify that the wait duration is reasonable and within system limits.

Related Resources