Variables and expressions
During a run, Knot keeps a JSON context: previous node outputs, trigger metadata, and global variables. You read it with Mustache expressions {{ }}.
💡 Context flow
Each node reads the accumulated context and adds its own output (key usually derived from the node id).
💡 Mustache syntax
| Pattern | Usage |
|---|---|
{{ nodes.<id>.field }} | Output field from a node |
{{ trigger.payload.x }} | Trigger input data |
{{ entity }} | Current Dolibarr entity (multi-entity) |
Example in an HTTP body or email field:
{ "subject": "Reminder {{ nodes.fetch_invoice.ref }}",}💡 Common patterns
- Concatenation: multiple
{{ }}in one string. - Conditions: prefer a Logic node (If/Else) over complex inline logic.
- Defaults: stub values in Simulate to avoid empty fields while designing.
💡 Good practices
- Rename nodes clearly in the editor — easier to find
nodes.*keys. - Never store secrets in plain text — use encrypted credentials for API tokens.
- Simulate every branch before activating the workflow.
💡 See also
- Nodes and edges
- HTTP connectors (details coming soon)