Skip to main content

Called by Workflow Trigger

What it does​

Starts a workflow when something else calls it with an input and waits for its answer. Type: workflow_trigger. Callers:

The workflow answers with a Return node. Unlike an HTTP trigger workflow, it has no HTTP request or response: the input is the caller's value as it is, and the answer is a status (success or error) and a body.

A workflow that starts with workflow_trigger cannot run behind a proxy route (only http_trigger workflows can) and has no background schedule.

Config​

FieldDescription
input_schemaOptional JSON Schema the caller's input must match. A caller whose input does not match gets an error naming the problem and the workflow does not run: the Execute Workflow node takes its error branch, an agent tool reports the error to the model, a guardrail connector fails (and follows its on_error), and a manual run answers 400.

The schema is checked when the workflow is saved with validation (publish, enabled proxy save): it must be a JSON object and a valid JSON Schema.

In the editor​

The step is Called by Workflow in the Triggers list of the step picker.

  • Options › Input schema (optional): a JSON Schema editor. Text that is not valid JSON, is not an object, or has a wrong type, properties or required shows an error and is not saved (the last valid schema stays); empty means any input. Use an example fills a sample schema. Under the editor, Callers send lists the schema's fields with their type and whether they are required, and the step card on the canvas shows them (Input: customer_id, include_orders, or Any input).
  • Parameters › Test input (JSON): a sample input for Test workflow and Test step in the editor, saved in the step's inputs as input. Real callers always send their own input.
  • Run now on a published workflow sends the JSON you type as the input and shows what the Return node returned.

Outputs​

FieldTypeDescription
inputanyThe caller's input

Read it downstream as {{ $json['workflow_trigger_1'].input }} (use the trigger's node id), for example {{ $json['workflow_trigger_1'].input.customer_id }}.

Example​

{
"nodes": [
{
"id": "workflow_trigger_1",
"type": "workflow_trigger",
"data": {
"config": {
"input_schema": {
"type": "object",
"required": ["customer_id"],
"properties": { "customer_id": { "type": "string" } }
}
}
}
},
{
"id": "return_1",
"type": "return_node",
"data": { "inputs": { "status": "success", "body": { "tier": "gold", "id": "{{ $json['workflow_trigger_1'].input.customer_id }}" } } }
}
],
"edges": [{ "id": "e1", "source": "workflow_trigger_1", "target": "return_1" }]
}

Notes​

  • A standalone workflow may have several triggers (at most one Called by Workflow trigger); callers always start it from this one. A workflow that a proxy runs has exactly one trigger.
  • Callers name the workflow by its workflow id (a standalone workflow) or by a proxy id (a proxy's workflow). See Execute Workflow node.
  • A guardrail connector runs it only while the workflow is active; Execute Workflow nodes and agent tools run its published definition whether or not it is active.
  • In the console test run, the step's Test input is passed as input.