trigger method starts a new workflow run and returns its workflowRunId.
You can also trigger multiple workflow runs in a single call by passing an array of arguments instead of a single object.
Arguments
string
required
The public URL of the workflow endpoint.
string
A custom identifier for the workflow run.
Each run must use a unique ID.The final ID will be prefixed with
wfr_.
For example: passing my-workflow results in wfr_my-workflow.If omitted, a run ID will be generated automatically.string | object
The request payload to pass into the workflow run.
Accessible as
context.requestPayload inside the workflow.object
HTTP headers to pass into the workflow run.
Accessible as
context.headers inside the workflow.string
Number of retry attempts for workflow steps. Default is 3.
string
Delay between retries. Can use expressions like “1000 * (1 + retried)”.
object
An optional flow control configuration to limit concurrency and execution rate of the workflow runs.See Flow Control for details.
string
Delay for the workflow run. This is used to delay the execution of the workflow run. The delay is in seconds or can be passed as a string with a time unit (e.g. “1h”, “30m”, ”15s”).
number
Optionally set the absolute delay of this message.
This will override the delay option.
The message will not delivered until the specified time.Unix timestamp in seconds.
string | string[]
An optional label to assign to the workflow run.
This can be useful for identifying and filtering runs in the dashboard or logs.Pass an array to attach multiple labels to a single workflow run. The run will
then match a logs or DLQ filter for any of its
labels (OR semantics).
boolean
If set to true, telemetry data collection for this workflow run will be disabled.
By default, telemetry is enabled to help improve Upstash services.See the
disableTelemetry parameter in serve options for more details.