# Sleep

<!-- meta: type=sleep; location=Logic; category=Logic; platforms=Joomla and WordPress (where applicable) -->

## Overview

Pauses the flow for the given number of seconds, then passes the incoming payload through unchanged.

This step executes when the flow reaches it along a wired path. It does not call external services by itself unless combined with API or CMS steps — it shapes *how* the flow continues.

## Why use this node

Sleep is a **logic step** in the **Logic** group. Logic steps control how data moves through the flow: branch on conditions, loop over lists, pause, merge parallel paths, or reshape payloads.

Typical reasons teams add **Sleep** to a flow:

- Wait for an external system to finish processing before the next API call
- Rate-limit outbound requests in a loop (e.g. one call every few seconds)
- Give a webhook caller time to complete a follow-up action before polling

## Example workflows

Common patterns on the canvas:

1. **API REST GET** (start job) → **Sleep** (wait) → **API REST GET** (poll status)
2. **Iterator** → **API REST POST** → **Sleep** (rate limit) → next iteration

## How to set it up

Duration on Design; maximum 15 minutes per sleep node.

## Good to know

Use sparingly on webhook-triggered flows — long sleeps hold worker resources.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **General** | Canvas label and read-only node ID |
| **AI** | Optional assistant to help draft settings from plain language |
| **Design** | Node-specific configuration fields |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_payloadFields` | Available Fields | `payload-panel` | No | — | — |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `seconds` | Duration (seconds) | `payload-text` (default: `15`) | **Yes** | — | 15 or {{node_id.pollIntervalSeconds}} How long to pause before continuing. Supports {{placeholders}}. Maximum 900 seconds (15 minutes). |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{sleep.sleptSeconds}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `sleptSeconds` | number | Number of seconds the sleep node waited. |
| `sleepMessage` | string | Optional message recorded after sleeping. |

## Validation rules

- **Duration (seconds)** (`seconds`) must be filled before the flow can be saved.

## Related nodes

Other steps in the same area of the palette:

- **Array to String** (`join-array-to-text`) — Logic
- **Check Condition** (`if`) — Logic
- **Filter List** (`filter-list`) — Logic
- **Logger** (`debug`) — Logic
- **Match Text** (`match-regex`) — Logic
