Skip to content

Merge Data Task

Overview

The Merge Data Task consolidates output variables from parent tasks into named variables for easier reference. Use it to simplify complex workflows by creating clean, descriptive variable names from nested task outputs.

When to use this task:

  • Simplify deeply nested variable references
  • Create descriptive names for workflow data
  • Consolidate data from multiple parent tasks
  • Improve workflow readability
  • Pass selected data to child tasks
  • Rename variables for clarity
  • Extract specific fields from complex objects
  • Standardize variable naming

Key Features:

  • Merge any parent task output
  • Create custom variable names
  • Shorthand suffix matching (.email, .phone, etc.)
  • First non-empty value wins
  • Processes before standard variable replacement
  • Supports unlimited mappings
  • Simplifies complex workflows

The point of this task is renaming: several long, position-dependent variables from earlier tasks become short names that later tasks can use without knowing where the data came from:

flowchart LR
    A[task_101_customer_email] --> D[Merge Data]
    B[task_102_order_total] --> D
    C[task_103_invoice_url] --> D
    D --> E["email · total · invoice"]

Quick Start

  1. Add Merge Data task
  2. Map parent task outputs to new names
  3. Use new variable names in child tasks
  4. Save

Simple Example:

customer_name = {{task_15001_full_name}}
customer_email = {{task_15001_email}}
customer_phone = {{task_15001_cell}}

Use: {{task_53001_customer_name}} instead of {{task_15001_full_name}}

Configuration

Builder fields

The Field column is the label as it appears in the task builder; Key is the name the value is stored under and referenced by.

Field Key Type Default Notes
Output Variables output_vars dyn-rows –

Standard Mapping

Map any variable to a new name:

company = {{task_15001_company_name}}
contact = {{task_15001_full_name}}
email = {{task_15001_email}}
phone = {{task_15001_cell}}

Access merged data:

{{task_53001_company}}
{{task_53001_contact}}
{{task_53001_email}}
{{task_53001_phone}}

Shorthand Syntax

Use suffix matching for common fields:

email = .email
phone = .phone
name = .full_name
company = .company_name

How it works:

  • Searches ALL parent task outputs
  • Matches variable names ending with suffix
  • Returns first non-empty match found
  • Example: .email matches task_15001_email, task_55001_email, etc.

Complex Object Extraction

Extract nested data:

order_id = {{task_46001_order.id}}
order_total = {{task_46001_order.total}}
customer_id = {{task_46001_customer.id}}
customer_tier = {{task_46001_customer.tier}}

Multiple Source Priority

Merge with fallback:

phone = {{task_15001_cell}}
phone = {{task_55001_phone}}
phone = {{task_19001_value}}

First non-empty value is used (reads top to bottom).

Output Fields

All mapped variables become outputs with prefix task_53001_:

Mapped Name Output Variable Example
customer_name task_53001_customer_name John Smith
email task_53001_email john@company.com
phone task_53001_phone +15551234567
order_total task_53001_order_total 1250.00

Real-World Examples

Give long variable names short ones

Webhook In
  └─ Match to Client   look the client up
      └─ Merge Data    email, company, manager
          └─ Email     "Hi {{task_53001_company}}, your manager is {{task_53001_manager}}"

Without this the email would carry {{task_15001_match_client_responsible_manager_name}} in the middle of a sentence. Merge Data is what keeps the message readable.

Collect values from several tasks before sending them on

Form Submission
  └─ Phone Formatter   normalise the number
      └─ Merge Data    name, email, phone from three different tasks
          └─ Webhook Out   post the tidy object

Best Practices

Variable Naming

  1. Descriptive names - customer_email not email1
  2. Consistent convention - snake_case throughout
  3. Avoid conflicts - Don't reuse existing task field names
  4. Group related - Prefix related fields (order_id, order_total, order_date)

Good names:

customer_name = {{task_15001_full_name}}
customer_email = {{task_15001_email}}
order_total = {{task_42001_calculated_total}}
lead_score = {{task_42001_score}}

Poor names:

n = {{task_15001_full_name}}
e = {{task_15001_email}}
total = {{task_42001_calculated_total}}
score = {{task_42001_score}}

When to Use Merge Data

Good use cases:

  • Complex workflows with 5+ tasks
  • Variables used in multiple places
  • Nested object extraction
  • Improving readability
  • Template-heavy workflows (emails, PDFs)

Don't need it for:

  • Simple 2-3 task workflows
  • Variables used only once
  • Already simple variable names

Shorthand vs. Explicit

Use Shorthand when:

  • Common field names (email, phone, name)
  • Don't care which parent task it comes from
  • Want first non-empty value automatically

Use Explicit when:

  • Need specific task's output
  • Multiple tasks have same field name
  • Order matters for your logic

Workflow Organization

Place Merge Data task:

  1. After data collection - After all source tasks complete
  2. Before usage - Before tasks that need clean variables
  3. Strategic placement - Can have multiple Merge Data tasks at different stages

Troubleshooting

Variable Not Found

Issue: Merged variable returns empty or doesn't exist

Causes:

  • Source variable doesn't exist
  • Typo in variable reference
  • Parent task didn't execute
  • Source field is actually empty

Debug: Add Code task to inspect

return {
  source_value: input.task_15001_email || 'NOT FOUND',
  merged_value: input.task_53001_email || 'NOT FOUND',
};

Shorthand Not Matching

Issue: Shorthand .email not finding value

Causes:

  • No parent task has variable ending in "email"
  • All matching variables are empty
  • Case sensitivity (.Email vs .email)

Solution: Use explicit mapping instead

email = {{task_15001_email}}

Wrong Value Selected

Issue: Shorthand picked unexpected task's value

Cause: A shorthand {{propertyName}} is resolved by searching the parent tasks' outputs in queue order and taking the first key whose name ends with that property. If two earlier tasks both produced a email, the earlier one wins — the order is deterministic, not random, but it is the task order rather than one you chose.

Solution: Use explicit mapping with priority

email = {{task_15001_email}}
email = {{task_55001_email}}
email = {{task_46001_email}}

First non-empty from top to bottom.

Variable Name Collision

Issue: Merged variable name conflicts with system field

Cause: Used reserved name like client_id, task_id

Solution: Add prefix to avoid conflicts

merged_client_id = {{task_15001_client_id}}
merged_contact_id = {{task_15001_contact_id}}

Frequently Asked Questions

How many variables can I merge?

Unlimited. Add as many mappings as needed.

Can I merge from non-parent tasks?

No. Only parent tasks in the workflow tree are accessible.

Can I use merged variables in subsequent Merge Data tasks?

Yes, you can nest Merge Data tasks and reference previous merges.

Does it work with arrays and objects?

Yes, but you need to reference specific properties:

item_name = {{task_29001_item.name}}
item_price = {{task_29001_item.price}}

What if multiple mappings have same name?

First non-empty value wins (top to bottom).

Can I merge Loop iteration variables?

Yes, useful inside loops:

current_item = {{task_29001_item}}
current_index = {{task_29001_index}}

How does shorthand matching work exactly?

Searches all parent outputs, matches suffix, returns first non-empty. Example: .email matches any variable ending in "email".


  • Variable - Store temporary data in workflow
  • Coalesce - Select first non-empty from options
  • Code Task - Complex data transformations
  • If Task - Use merged variables in conditions
  • Loop - Merge loop iteration data
  • Formatter - Format merged data