Workflows
Blocks
Logic
Wait

Wait Block

What it does: Pause your workflow for a specific amount of time or until a particular date/time.

⏱️

In simple terms: Make your workflow take a break - "wait 5 minutes before sending the email" or "pause until tomorrow at 9 AM".

When to Use This

Use the Wait block when you need to:

  • ✅ Add delays between actions
  • ✅ Schedule actions for specific times
  • ✅ Implement rate limiting
  • ✅ Give time for external processes to complete
  • ✅ Space out notifications
  • ✅ Create timed sequences

Example: After sending a welcome email, wait 24 hours, then send a follow-up email with tips.

How It Works

  1. Previous Action: Workflow reaches Wait block
  2. Pause: Workflow execution stops
  3. Timer: System tracks elapsed time
  4. Resume: Continue when time is up
  5. Next Action: Proceed with workflow

Wait Types

1. Duration-Based Wait

Pause for a specific amount of time.

Time Units:

Seconds: 30 seconds
Minutes: 5 minutes
Hours: 2 hours
Days: 1 day

Examples:

Wait 30 seconds
Wait 5 minutes
Wait 2 hours
Wait 1 day
Wait 7 days

With Variables:

Wait {{delayMinutes}} minutes
Wait {{calculateDelay()}} seconds

2. Timestamp-Based Wait

Pause until a specific date and time.

Formats:

ISO 8601: 2024-12-25T09:00:00Z
Unix Timestamp: 1735117200
Date String: 2024-12-25 09:00:00

Examples:

Wait until: 2024-12-25T09:00:00Z
Wait until: {{event.scheduledTime}}
Wait until: {{calculateNextMonday()}}

Time Zones:

UTC: 2024-12-25T09:00:00Z
EST: 2024-12-25T09:00:00-05:00
PST: 2024-12-25T09:00:00-08:00

3. Relative Time Wait

Wait until a specific time relative to now.

Examples:

Wait until tomorrow at 9:00 AM
Wait until next Monday at 10:00 AM
Wait until end of day (11:59 PM)
Wait until next hour

Configuration

Duration Wait

Amount: How long to wait

Number: 5

Unit: Time measurement

seconds
minutes
hours
days

Dynamic Duration:

{{user.preferences.reminderDelay}} minutes
{{calculateOptimalWaitTime()}} hours

Timestamp Wait

Wait Until: Target date/time

2024-12-31T23:59:59Z
{{appointment.scheduledTime}}
{{event.startTime}}

Time Zone: Time zone for timestamp

UTC
America/New_York
Europe/London
Asia/Tokyo

Advanced Options

Wait Mode:

Blocking: Workflow is paused (default)
Non-blocking: Continue workflow, trigger later

Timeout: Maximum wait time

Max Wait: 30 days
If exceeded: Continue anyway or fail

Cancellable: Allow early termination

Allow Cancel: true/false
Cancel Trigger: {{shouldCancelWait}}

Common Use Cases

Example 1: Email Drip Campaign

Sequence: Progressive emails

1. Send welcome email
2. Wait 24 hours
3. Send tips email
4. Wait 3 days
5. Send feature highlights
6. Wait 7 days
7. Send upgrade offer

Implementation:

Send Email: "Welcome!"

Wait: 1 day

Send Email: "Here are some tips..."

Wait: 3 days

Send Email: "Check out these features..."

Wait: 7 days

Send Email: "Special upgrade offer!"

Example 2: Appointment Reminder

Trigger: Appointment scheduled Wait: Until reminder time

Set Variable: reminderTime
  = {{appointment.time}} - 1 hour

Wait until: {{reminderTime}}

Send SMS:
  To: {{customer.phone}}
  Message: "Reminder: Your appointment is in 1 hour at {{appointment.time}}"

Example 3: Rate Limiting

Use: API calls with rate limits

For each item in list:
  1. Make API call
  2. Wait: 2 seconds
  3. Continue to next item

(Ensures max 30 calls per minute)

Example 4: Processing Pipeline

Use: Wait for external processing

1. Upload file for processing
   Response: {{job.id}}

2. Wait: 30 seconds

3. Check job status
   GET /api/jobs/{{job.id}}

4. Condition: If not complete
   Loop back to step 2
   
5. If complete: Download result

Example 5: Business Hours Queue

Use: Schedule for business hours

Trigger: Support ticket received at 11 PM

Condition: If current time is after 6 PM
  Calculate: nextBusinessDay at 9 AM
  Wait until: {{nextBusinessDay}}
  Assign ticket to agent
Else:
  Assign immediately

Example 6: Reminder Sequence

Use: Progressive reminders

Event: Task assigned

Wait: 2 days
Send Reminder: "Don't forget about {{task.name}}"

Wait: 2 more days  
Send Reminder: "{{task.name}} due soon!"

Wait: 1 day
Send Urgent Reminder: "{{task.name}} due today!"

Best Practices

Timing

  • Use appropriate units (don't wait 86400 seconds, use 1 day)
  • Consider time zones for timestamp waits
  • Account for weekends if needed
  • Set realistic maximums to avoid hanging workflows
  • Test with shorter times during development

Workflow Design

  • Document wait purposes in workflow notes
  • Use variables for flexibility (easy to adjust)
  • Add timeout conditions for safety
  • Consider user experience (don't wait too long)
  • Plan for failures during wait period

Performance

  • Batch waits when possible instead of many small ones
  • Use scheduled triggers for long waits (days/weeks)
  • Monitor active wait states in system
  • Clean up cancelled waits promptly
  • Avoid unnecessary waits

Error Handling

  • Set maximum wait times to prevent indefinite waits
  • Handle timeout scenarios gracefully
  • Log wait start and completion for debugging
  • Allow cancellation when appropriate
  • Resume gracefully after waits

Advanced Patterns

Exponential Backoff

For retries with increasing delays:

Attempt 1: Immediate
Fail → Wait: 1 second

Attempt 2: After 1 second
Fail → Wait: 2 seconds

Attempt 3: After 2 seconds  
Fail → Wait: 4 seconds

Attempt 4: After 4 seconds
Fail → Wait: 8 seconds

Smart Scheduling

Wait until optimal time:

// Calculate best send time
Set Variable: optimalTime
  if {{user.timezone}} == "America/New_York":
    = Today at 10:00 AM EST
  else if {{user.timezone}} == "Asia/Tokyo":
    = Today at 10:00 AM JST
    
Wait until: {{optimalTime}}
 
Send Email: ...

Conditional Wait

Wait based on condition:

Condition: If {{user.plan}} == "premium":
  Wait: 1 hour (priority processing)
Else:
  Wait: 4 hours (standard processing)

Continue with processing...

Multi-Stage Wait

Complex timing scenarios:

Stage 1: Immediate
  Send confirmation

Stage 2: Wait 1 hour
  Send thank you

Stage 3: Wait 1 day  
  Send survey

Stage 4: Wait 7 days
  Send follow-up offer

Troubleshooting

Wait Not Completing

Causes:

  • Timestamp is in the past
  • Duration is too large
  • Workflow timeout exceeded
  • System issues

Solutions:

  • Validate timestamp is future
  • Check duration value
  • Set reasonable timeout
  • Check workflow logs

Incorrect Wait Duration

Issues:

  • Wrong time unit selected
  • Variable has unexpected value
  • Calculation error
  • Time zone confusion

Debug:

Log before wait:
  "Waiting for {{duration}} {{unit}}"
  "Current time: {{currentTime}}"
  "Resume at: {{resumeTime}}"

Workflow Timeout

Problem: Wait longer than workflow timeout

Solutions:

  • Use scheduled trigger instead
  • Break into multiple workflows
  • Increase workflow timeout (if possible)
  • Use external queue system

Time Zone Issues

Issues:

  • Wrong local time used
  • DST not accounted for
  • Timezone not specified

Fix:

  • Always use explicit time zones
  • Test across time zones
  • Use UTC for calculations
  • Convert to local for display

Limitations

Duration Limits

  • Maximum Wait: Typically 30 days
  • Minimum Wait: 1 second
  • Precision: Seconds (not milliseconds)
  • Concurrent Waits: Platform dependent

Workflow Constraints

  • Total Execution Time: Subject to workflow timeout
  • Long Waits: May incur additional costs
  • Multiple Waits: Accumulate time
  • Resource Usage: Waiting workflows consume resources

Reliability

  • System Maintenance: May interrupt waits
  • Cancellation: User or system can cancel
  • Power Outages: Resume when system recovers
  • Clock Changes: DST or system time changes
💡

Tip: For waits longer than a few hours, consider using a scheduled trigger instead of a wait block for better reliability!

Example Workflow

Related Blocks

  • Loop: Use with wait for polling patterns
  • Condition: Conditional waits
  • Schedule Trigger: Alternative for long waits
  • Set Variable: Calculate wait times
  • HTTP Request: Wait for external processes
  • ForEach: Wait between processing items

Need Help?

  • Test waits with short durations first (seconds)
  • Log timestamps before and after waits
  • Consider time zones carefully
  • Use scheduled triggers for long delays
  • Monitor workflow execution logs
  • Set appropriate timeouts

Pro Tip: Combine Wait blocks with Conditions to create intelligent timing - send emails when users are most likely to engage!

Indite Documentation v1.4.0
PrivacyTermsSupport