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 Pongo2 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 (Pongo2)

Once mapped, use Pongo2 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.
  • Start Node: Access trigger data and workflow inputs
  • End Node: Format final output data
  • Stop Node: Access data before force-terminating subflows
  • LLM Node: Include context in system prompts and user messages
  • Tool Node: Pass data as tool parameters and inputs
  • Chat Memory Node: Dynamic chat ID generation and context
  • Add Memory Node: Access data to store in conversation history
  • Delete Memory Node: Reference data for selective deletion
  • Get Memory Data Node: Build query parameters dynamically
  • Switch Node: Use in condition evaluation and branching logic
  • Merge Node: Access merged data for processing
  • Subflow Node: Pass data to nested workflows
  • Template Node: Access data for text formatting and generation
  • Transform Node: Reference data for transformation operations
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
Pongo2 Documentation: Splox uses the Pongo2 template engine. Full syntax reference: https://github.com/flosch/pongo2

What’s Next?