Dynamic Delay

Dynamic Delay (Payload-Driven Scheduling) lets you control when each workflow continues by passing a datetime field in your payload. Novu pauses and resumes execution at that moment, giving you precise, per-trigger delivery without fixed delays or cron rules.

Cover
Contributors
  • Dima Grossman

    Dima Grossman

Details

Schedule a workflow to pause until a datetime you provide at trigger time. Configure a Delay step with a delayPath, then pass the ISO datetime in your event payload. Each trigger can resume at its own time, making it ideal for appointment reminders, renewals, or any other per-user timing.

What you can do

  • Per-trigger timing: Each event determines its own resume time via its payload.
  • Works anywhere in the workflow: Before or between any steps (including before digests).
  • Cancelable: Use transactionId to cancel pending delays.
  • Frictionless: No cron required for per-user scheduling.

How it works

In the Dashboard

  1. Add a Delay step
  2. Select Dynamic
  3. Set Path for scheduled date (e.g., payload.sendAt)

At trigger time (API/SDK)

Send an ISO 8601 UTC datetime on that path:

{
  "workflowId": "appointment-reminder",
  "to": { "subscriberId": "user_123" },
  "payload": {
    "sendAt": "2025-12-01T09:00:00.000Z",
    "name": "Alex"
  }
}

The workflow pauses and resumes exactly at payload.sendAt.

Behavior & validation

  • Required: delayPath on the step AND an ISO 8601 UTC value (...Z) in the payload.
  • If missing/invalid: The Delay job is canceled, and execution details show DELAY_MISCONFIGURATION with an error message.
  • If the datetime is in the past, it is rejected with a “future date required” error.
  • Canceling: client.cancel(transactionId) stops pending delay jobs for that transaction.

Example Use Cases

Appointment reminder

  • Delay (Scheduled) → delayPath = sendAt
  • After the delay → SMS/Email/In-app step
  • Trigger with sendAt per appointment.

Subscription renewal

  • Delay (Scheduled) → delayPath = renewalAt
  • After the delay → Email/In-app notice
  • Trigger with renewalAt per subscriber.