query_1 or http_request_2. You use this id to read the step’s output in later steps: {{nodes.query_1.output}}. See Variables.
Start
Added automatically and cannot be deleted. It runs when an AI client calls the tool. Its output is the tool’s parameters, which you read as{{params.name}}.
Database
Opens a connection that later Query steps use. It does not run any SQL by itself.
Output:
{connected: true, provider: "pg"}
Database hosts must be reachable from the internet and use a standard database port. Private and internal addresses are blocked by the sandbox.
Query
Runs SQL on a Database step that runs before it.
The number of bindings must match the number of
? placeholders. Click Load tables to list the tables of the connected database and insert a table name into your query with one click.
{{params.id}}
Output: an array of rows, for example [{"id": 1, "email": "ada@example.com"}]. Read the first row with {{nodes.query_1.output[0]}}.
HTTP Request
Calls a REST API and uses its JSON response.
Example URL:
https://api.example.com/items/{{params.id}}
Output: the parsed JSON response, or the raw text when the response is not JSON.
HTTP Request, Database and Query steps also have an Errors stage. See Error handling.
Transform
Builds a new object from parameters and the outputs of earlier steps. Use it to keep only the fields you need or to rename them.
Output:
{"title": "...", "greeting": "Hello Ada!", "status": "open"}
Condition
Compares a value and continues on the true or the false branch. Connect each branch handle to the steps that should run in that case.
Output:
true or false.
Static Data
Returns fixed JSON, for example mock data, a lookup table or a constant response.
Output: the parsed JSON.
For Each
Runs the steps connected to its each output once for every item in a list, then continues from its done output. You find it in the Logic group of the palette.
The step has two outputs:
Variables inside the loop
Inside the body,
{{nodes.<step-id>.output}} of a body step always means the output for the current item. Steps before the For Each step can be used as usual.
Output
{{nodes.loop_1.output}} is a list with one entry per item: the output of the last step of the loop body for that item. If the body skipped that item (for example on the other branch of a Condition), its entry is null.
Example. The list [{"id": 1}, {"id": 2}] goes into a body that ends in a Transform with userId = {{loop.item.id}} and position = {{loop.index}}:
For Each processed the first 50 items of 120.
If the value is not a list (for example an object or an empty variable), the step fails with Items must be a list. Point the field at the array inside the response, for example .output.items instead of .output.
Rules for the loop body
- It must end in exactly one step. If you branch with a Condition, merge the branches with a Transform step.
- Return, Database and For Each steps cannot be inside the body. Loops cannot be nested. Open the Database connection before the loop and use it from a Query step inside.
- Body steps only connect to each other. Continue the workflow from done.
- Steps after done read the result through
{{nodes.<for-each-id>.output}}, not through the body steps. - Items run one after another, not in parallel, so an external API never gets a burst of requests at once.
Example: enrich every item
Run limits
A For Each step can only walk through a list. It never repeats on a condition, so it cannot run forever. Every run of a workflow tool also has fixed limits:Error handling
HTTP Request, Database and Query steps have an Errors stage in the inspector. It decides what happens when the step fails and, for HTTP Request and Database, whether to try again first.When this step fails
When the step fails and the error branch is on:
- The steps on the normal output are skipped, and the steps on the error output run.
- When the step succeeds, the error branch is skipped.
- If the error output is not connected, the step shows
Connect the error output or choose Stop the tool.
The error variable
On the error branch, read the failure from the step that failed:
These variables only work in steps on that step’s error branch. Anywhere else the field shows
Use nodes.<step-id>.error only on the error branch of <step-id>.
Example: return a clear answer instead of failing when an order is not found.
Retries
HTTP Request and Database steps can try again before they count as failed.- Retries run first. Only when they are used up does the When this step fails option take effect.
- Every attempt counts toward the limit of 100 HTTP and database calls per run.
- A test run logs each retry, for example
↻ Get order failed, retry 1 of 3: HTTP 503: Service Unavailable. - Query steps don’t retry, because a write query could run twice.
- POST and PATCH requests may reach the API more than once when retries are on. Only turn retries on for requests that are safe to repeat.
Workflows created before error handling existed open with Stop the tool and Do not retry on every step, so their behavior does not change.
Return
Sends the final result back to the AI client and ends the tool.
You can add one Return step per branch. The first Return step that runs ends the tool. If no Return step runs, the tool returns
null.