Skip to main content

Overview

Variable mappings are a fundamental feature in Splox that allow nodes to access and reference data from previous nodes in the workflow. All node types support variable mappings.
Variable Mapping interface in node editor
Variable Mapping interface in node editor

How Variable Mappings Work

1

Select Source Node

Choose which previous node’s output you want to accessAvailable nodes: Any node that has already executed in the workflow
2

Define Mapping Name

Give the mapping a name to reference in templatesExample: user_data, api_response, search_results
3

Use in Templates

Reference the mapped data using Jinja2 template syntaxSyntax: {{ mapping_name.field }}

Configuration Structure

Variable mappings are stored in the node configuration:
{
  "variable_mappings": [
    {
      "node_json_schema_id": "abc-123-456",
      "mapping_name": "user_data"
    },
    {
      "node_json_schema_id": "def-789-012",
      "mapping_name": "api_response"
    }
  ]
}

Template Syntax (Jinja2)

Once mapped, use Jinja2 syntax to access the data:
Reference mapped variables
{{ user_data }}                     <!-- Entire output -->
{{ user_data.name }}                <!-- Specific field -->
{{ user_data.profile.email }}       <!-- Nested field -->
{{ api_response.items.0 }}          <!-- Array element -->

Nodes That Support Variable Mappings

All node types support variable mappings, allowing you to reference data from previous nodes throughout your entire workflow.
  • Access trigger data ({{ start.text }}, {{ start.chat_id }}, {{ start.files }})
  • Reference workflow inputs and webhook payloads
  • Include context in system prompts and user messages
  • Reference outputs from previous nodes for dynamic instructions
  • Pass data as tool parameters and inputs
  • Reference upstream outputs for dynamic tool arguments
  • Use in condition evaluation and branching logic
  • Reference data to determine which branch to follow
  • Access merged data from parallel branches
  • Reference outputs from all converging paths
Variable mappings are a universal feature in Splox. Every node can access outputs from any previously executed node in the workflow.

Common Use Cases

API Response Formatting

Map API node output and format for LLM consumption
{{ api_data.results|json }}

User Context

Pass user information between nodes
User {{ user.name }} ({{ user.email }})

Conditional Logic

Make decisions based on previous outputs
{% if result.status == "success" %}

Data Transformation

Transform data formats between nodes
{{ data.items|length }} items found
Jinja2 Documentation: Splox uses the Gonja template engine (Jinja2 for Go). Full syntax reference: https://github.com/NikolaLohworkarinski/gonja

What’s Next?

Agent Node

Use variable mappings in Agent system prompts

Tool Node

Pass dynamic data to tool parameters

Switch Node

Reference data in Switch node conditions

Start Node

See what data the Start node provides