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
The public URL of the workflow endpoint.
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.The request payload to pass into the workflow run.
Accessible as
context.requestPayload
inside the workflow.HTTP headers to pass into the workflow run.
Accessible as
context.headers
inside the workflow.retry to use in the initial request. in the rest of the workflow,
retries
option of the serve
will be used.delay between retries.
An optional flow control configuration to limit concurrency and execution rate of the workflow runs.See Flow Control for details.
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”).
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.
If both
failureUrl
and useFailureFunction
are provided, useFailureFunction
takes precedence and the value of the url
parameter is used as failureUrl
.An optional label to assign to the workflow run.
This can be useful for identifying and filtering runs in the dashboard or logs.