Skip to main content

The Two Data Sources

QuivaWorks flows work with two primary data sources that you can reference using variable mapping:

Trigger Data

Data provided when the flow starts (webhooks, API calls, manual triggers)

Node Data

Output data from any previously executed node in your flow

Core Syntax Pattern

The basic syntax follows this pattern:
  • $ - Root indicator (always required)
  • source - Either trigger or a NODE_ID
  • property - The data you want to access
The $. prefix tells QuivaWorks to evaluate this as a variable mapping expression rather than treating it as a literal string.

Accessing Trigger Data

Trigger data is available from the very first node in your flow. It contains the data provided when the flow was initiated.
When a webhook triggers your flow:
Webhook Payload
Variable Mapping
Result:
Trigger data is read-only throughout the flow. It contains the original input and doesn’t change as nodes execute.

Accessing Node Data

Node data becomes available after a node completes execution. You can reference any previously executed node using its unique ID.

Basic Node Access

Execution Order Matters

1

Node 1: fetch_customer

Executes first. Can access $.trigger.* but no other nodes yet.
2

Node 2: fetch_orders

Can access $.trigger.* and $.fetch_customer.*
3

Node 3: send_email

Can access $.trigger.*, $.fetch_customer.*, and $.fetch_orders.*
You cannot reference a node that hasn’t executed yet. If Node 2 tries to access $.node_3.data, it will return undefined.

Nested Properties

Access deeply nested data using dot notation:
Data
Mapping

Array Access

Arrays use zero-based indexing (first element is at index 0).

Accessing Array Elements

Negative indexes count from the end:
  • [-1] = last item
  • [-2] = second to last item
  • [-3] = third to last item

Accessing Properties in Array Items

Data
Mapping
Result

Combining Trigger and Node Data

Real-world flows typically combine both data sources:

Type Handling

Variable mapping preserves data types from the source:
Input
Mapping
Output (Strings)

Handling Missing Data

When a path doesn’t exist, variable mapping removes the property from the output entirely:
Properties with missing data are removed from the output entirely. They won’t appear as undefined or null - they simply won’t exist in the result object.
Use a trailing pipe to ensure missing values create the property with an empty string:
Result:
This keeps the property in the output instead of removing it completely.Note: The trailing pipe also affects how arrays and objects are handled:
  • Arrays: Joined as comma-separated string (e.g., "a,b,c")
  • Objects: Converted to "[object Object]" (usually not desired)
Learn more about the pipe operator in Pipe Operator.

Type Handling with Pipe Operator

The trailing pipe (|) forces string conversion, which affects different data types:
Data
Mapping
Result (unchanged)
Strings, numbers, and booleans are all converted to strings with pipe.
Use trailing pipe carefully:

Best Practices

Choose clear, meaningful node IDs that describe what the node does:
Only reference nodes that have already executed:
Use the Flow Debugger to verify node execution order.
Always plan for missing or null data. Use a trailing pipe to ensure empty strings:
Or use static text concatenation for default messages:
Use the Flow Debugger to test mappings with actual data:
  1. Run your flow with test data
  2. Inspect each node’s output
  3. Verify mapping expressions return expected values
  4. Check for undefined or null values

Common Patterns

Quick Syntax Reference

Try It Yourself

1

Create a Test Flow

Set up a simple flow with a manual trigger
2

Add Test Data

Provide sample JSON data in the trigger form
3

Add a Node

Create a node that uses variable mapping to access trigger data
4

Run and Debug

Execute the flow and inspect the results in the debugger

What’s Next?

JSONPath Features

Learn advanced selectors like wildcards, slicing, and recursive descent

Pipe Operator

Build dynamic strings and provide fallback values

Examples

See real-world variable mapping patterns

Reference

Quick syntax lookup and troubleshooting
Questions? Check the Reference for troubleshooting or visit our Help Center.