Skip to main content
The notify method notifies workflows that are waiting for a specific event. Workflows paused at a context.waitForEvent step with the matching eventId will be resumed, and the provided eventData will be passed back to them.

Arguments

eventId
string
required
The identifier of the event to notify.
eventData
any
Data to deliver to the waiting workflow(s). This value will be returned in the eventData field of context.waitForEvent.

Response

Returns a list of Waiter objects representing the workflows that were notified:
Waiter
object

Usage

import { Client } from "@upstash/workflow";

const client = new Client({ token: "<QSTASH_TOKEN>" });

await client.notify({
  eventId: "my-event-id",
  eventData: "my-data", // data passed to the workflow run
});