{{ variable }} syntax. When a config field uses format: "template", FlowDrop provides autocomplete for available variables.
How it works
- A node has a config field with
format: "template" - FlowDrop analyzes the upstream nodes connected to the current node
- Output port schemas from those nodes become available as template variables
- Users type
{{and get autocomplete suggestions
Output port schemas define the variables.The upstream node’s output port schema determines which variables are available. Downstream nodes with
format: "template" fields get autocomplete for those variables.Configuring template fields
In your node’sconfigSchema, use format: "template" with a variables configuration:
Variable sources
Thevariables config supports three sources:
1. Port-derived variables
Automatically derive variables from upstream node connections:ports— which input port IDs to derive variables fromincludePortName— prefix variables with the port name (default: false)showHints— show clickable variable hints below the editor (default: true)
2. Static schema
Define variables explicitly:3. API-fetched variables
Fetch variables from an API endpoint at runtime:{workflowId} and {nodeId} placeholders that resolve at runtime.
Template syntax
FlowDrop’s template editor supports Jinja-like syntax:Variable access
Supported syntax
Autocomplete behavior
The template editor provides intelligent autocomplete:{{triggers top-level variable suggestions.after a variable triggers property drill-down[after an array variable triggers index suggestions ([0],[1],[*])- Type icons show the variable type:
𝑆string,#number,☑boolean,[]array,{}object
Port schemas for variable resolution
For port-derived variables to work, upstream nodes need output ports withschema:
{{ result.summary }}, {{ result.score }}, and {{ result.tags[0] }} available as template variables in downstream nodes.
Registering the template editor
The template editor requires CodeMirror. Register it before mounting:Variable schema merging
When multiple sources are configured (ports + schema + API), they merge with this precedence:- API variables (highest priority)
- Static schema variables
- Port-derived variables (lowest priority)