Data Between Steps
Variables work like mail-merge fields in a letter: you write {{trigger.name}} in a block's settings, and when the run happens, Nirvai replaces it with the real value — the actual customer name from the actual event. That's how data flows through your automation: every block can reach back and use what came before it.
The three variable families
| Variable | Reaches | Example |
|---|---|---|
{{trigger...}} | The data that started the run — the deal, the order, your manual input | {{trigger.dealname}}, {{trigger[0].amount}} |
{{steps.N.output...}} | What step number N produced | {{steps.3.output.summary}} |
{{item...}} | Inside For Each / Loop: the item being processed right now | {{item.email}} |
Use them anywhere you type a value: agent instructions, tool fields, database fields, and every rule builder.
The variable picker
You don't have to remember paths — every field that accepts variables has a picker that shows what's available from earlier steps, inserted as neat pills. Each suggestion carries a trust label:
| Label | Meaning |
|---|---|
| Verified structure | The producing step promises this field exists (a structured agent output) — the safest pick |
| From your test | Seen in the sample you captured while testing the trigger |
| Seen in last run | Existed the last time this automation ran |
| Unlabeled | You typed it by hand — allowed, but nothing guarantees it exists |
Try it below — click a suggestion to drop it into the Subject field as a pill:
{{trigger.dealname}}The picker warns but never blocks — you can always type a path you know is coming. The labels just tell you how sure Nirvai is that it will be there.
When a variable comes out empty
If a {{variable}} finds nothing at run time, the run does not crash — but tool and database blocks report it loudly in the run results ("N values resolved to nothing"), and fields that resolved empty are left out of database writes. If a step's output looks blank, this warning is the first thing to check.
One rule for free-form agent output
A structured agent step exposes its individual fields. A free-form agent step exposes only its whole answer ({{steps.N.output}}) — because nothing guarantees which fields a free-written answer contains. Want fields? Give that step structured output.
Common mistakes
| Mistake | Better approach |
|---|---|
| Guessing field names by hand | Test the trigger first (Listen) — then the picker shows the real fields from a real event. |
Reading {{steps.2.output.score}} from a free-form agent | Make step 2 structured, with score as a promised field. |
Using {{item...}} outside a For Each / Loop | It only exists inside those blocks; elsewhere use {{trigger...}} or {{steps...}}. |
What's next
See your variables filled in with real values in Testing & Runs.