Sleep Component
Use the Sleep component to intentionally pause a workflow for a specific duration. It's an essential tool for managing timing, handling API rate limits, and synchronizing actions with external systems.
Why this matters
What You’ll Configure
Step 1: Set the Delay Duration
The only setting to configure is the amount of time, in seconds, that the workflow should pause before proceeding to the next step.
Setting | Required? | Description | Tips |
---|---|---|---|
Delay | Yes | The length of the pause in seconds. | Default: 1 . Max: 3600 (1 hour). You can use a dynamic value from a previous step. |
Dynamic Delays
Best Practices
- Manage Rate Limits: This is the most common use case. Place a
Sleep
component inside a ForEach Loop when calling an API to ensure you don't exceed the service's request limit. - Wait for External Processes: If you trigger an external process (like a file write or a database update), use
Sleep
to add a short pause, giving the system time to complete the action before your workflow tries to access the result. - Create Natural Cadence: In a chatbot, a short
Sleep
before a response can simulate a "typing" delay, making the interaction feel more natural. - Avoid Very Long Delays: For pauses longer than a few minutes, it's better to use an Async and Await pattern. The
Sleep
component is designed for short-term delays.
Troubleshooting Tips
If your workflow seems stuck or delayed...
What to Try Next
- Place a
Sleep
inside a ForEach Loop that makes an API Call on each iteration to process a list without getting rate-limited. - Use a Code Component to calculate a dynamic delay based on business logic, and pass the result to the
Sleep
component. - Create a more human-like chatbot by using a
Sleep
component to add a pause before the LLM Assistant generates a response.