Delay Node

The Delay Node introduces a timed pause into your workflow.

When data flows into this node, it holds the data for a specified duration before passing it along, unchanged, to the next node.

Purpose

  • Rate Limiting: Prevent overwhelming an external API by spacing out requests.
  • Waiting for External Processes: Allow time for another system to finish a task.
  • User Experience Simulation: Simulate latency or give users time to observe UI changes.
  • Sequential Operations: Ensure one action completes before the next starts.
  • Polling: Pause between attempts when polling an endpoint for status updates.

Configuration

Configurable properties:

PropertyTypeDescriptionDefault
labelstring (optional)Descriptive name for this node instance.'Delay'
delayMsnumber (optional)Duration of the delay in milliseconds (ms).1000 (1s)

The node’s visual display shows the delay formatted in seconds (e.g., “1.5s”) if the delay is 1000ms or more, and in milliseconds (e.g., “500ms”) if less.

Inputs and Outputs

Input (Left Handle):
Receives any data from an upstream node. This data will be held during the delay period.

Output (Right Handle, id: "output"):
Emits the exact same data that was received at the input, but only after the specified delayMs has elapsed.

Logic of Execution

  1. Data is received at the input handle.
  2. The node initiates a pause for the duration specified by delayMs.
  3. During this pause, the workflow is halted at the Delay Node.
  4. Once delayMs has completed, the node releases the originally received data through its output handle.

Example: Staggered API Calls

Suppose you need to make several API calls, but the API allows only 1 request per second.

  • A Loop Node iterates over items requiring API calls.
  • Inside the loop, after the HTTP Request Node, add a Delay Node.

Node Configuration:

  • label: Wait 1 Second
  • delayMs: 1000

Execution Flow in Loop Body:

  1. Item 1 processed by HTTP Request Node.
  2. Data flows to Delay Node, which pauses for 1 second.
  3. After 1 second, data (API response or original item) flows out, and the loop proceeds to the next iteration.

This spaces out each API call by at least 1 second.

Notes and Considerations

  • Workflow Duration: Delays add to the workflow’s total execution time. Use only when needed.
  • Blocking Behavior: This node blocks downstream nodes in its path until the delay completes.
  • Accuracy: Delays are generally accurate but not for sub-millisecond precision needs.
  • Visual Feedback: The node usually indicates its delaying state visually if execution is monitored.

This node is a simple but effective tool for controlling timing and pacing in your workflows.

Loading search features...