Group by Playbook Instance

Last Updated: October 26, 2026

When configured with "groupBy": "Playbook Instance", the Merge task consolidates all arriving upstream execution lineages into a single merged result. Each completed upstream lineage reaching the Merge task contributes one execution-lineage object.

Unlike grouping by "Path" and grouping by "Task Instance", a Merge task that groups by "Playbook Instance" will only have one execution instance with a Raw Data tab containing the merge result array.

Merge Condition Format

To enable grouping by playbook instance, configure the Merge task's condition as:

JSON
{
  "groupBy": "Playbook Instance"
}

Core Concepts

The examples below demonstrate how variations in task structure, path specification, and output availability influence merge.

Example 1 - Merging Parallel Lineages

objective – Learn that groupBy: "Playbook Instance" aggregates all upstream lineages converging at the Merge task into a single result array.


Tip: you can also generate this playbook with AI. See Generating with AI.

  1. Build the following playbook:

    gbpi-01-ex1-playbook.png
  2. Use the default merge condition:

    JSON
    {
      "groupBy": "Playbook Instance"
    }
    
  3. Test run the playbook. Frame 1 (31)-20250602-235821.png

  4. Click on the status icon within the Merge task.

    gbpi-02-ex1-run.png
  5. Observe the execution results for the Merge task in the Raw Data tab.

    gbpi-03-ex1-raw.png

    Merge result

    JSON
    [
      {
        "DataSource": { ... },
        "A1": { ... },
        "A2": { ... }
      },
      {
        "DataSource": { ... },
        "B1": { ... },
        "B2": { ... }
      },
      {
        "DataSource": { ... },
        "C1": { ... },
        "C2": { ... }
      }
    ]
    

TAKEAWAYS

  • Each parallel execution lineage that converges at the Merge task contributes a separate object to the result array in the Merge task's Raw Data tab.

  • Among multiple executions of the Merge task, only one contains this consolidated result.

Example 2 - Merging Parallel Lineages Involving Unwind Tasks

objective – Understand how both non-repeating task flows and Unwind-driven executions contribute individual execution-lineage objects to the result of a Merge task.


  1. Build the following playbook:

    gbpi-04-ex2-playbook.png
  2. Input the following JSON data for the Unwind B task:

    JSON
    [
      {
        "demoKey1": "value1"
      },
      {
        "demoKey2": "value2"
      }
    ]
    

    Unwind B JSON Data
  3. Input the following JSON data for the Unwind C task:

    JSON
    [
      { "demoKey3": "value3" },
      { "demoKey4": "value4" },
      { "demoKey5": "value5" },
      { "demoKey6": "value6" },
      { "demoKey7": "value7" },
      { "demoKey8": "value8" },
      { "demoKey9": "value9" },
      { "demoKey10": "value10" },
      { "demoKey11": "value11" },
      { "demoKey12": "value12" }
    ]
    

    Unwind C JSON Data
  4. Use the default merge condition:

    JSON
    {
        "groupBy": "Playbook Instance"
    }
    

    Default merge condition (Playbook Instance)
  5. Test run the playbook. Frame 1 (31)-20250602-235821.png

  6. Click on the status icon within the Merge task.

    gbpi-08-ex2-run.png
  7. Observe the execution results for the Merge task in the Raw Data tab.
    Merge result

    JSON
    [
      {
        "DataSource": { ... },
        "A1": { ... },
        "A2": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      }
    ]
    

TAKEAWAY

  • Each completed upstream lineage reaching the Merge task—whether originating from a linear sequence of distinct task nodes or from repeated executions triggered by Unwind-based element deconstruction—results in a distinct execution-lineage object in the merge result.

Example 3 - Merge Tasks in Sequential Levels

objective – Demonstrate how Merge tasks behave when used in sequential levels.


  1. Build the following playbook:

    gbpi-09-ex3-playbook.png
  2. Configure the delay tasks appropriately.

    The four Delay command tasks (5, 6, 7 and 8 seconds)
  3. Use the default merge condition for all Merge tasks:

    JSON
    {
      "groupBy": "Playbook Instance"
    }
    
  4. Test run the playbook. Frame 1 (31)-20250602-235821.png

  5. Check the merge results.

    gbpi-11-ex3-run.png

    merge ABC result

    JSON
    [
      {
        "DataSource": { ... },
        "B": { ... }
      },
      {
        "DataSource": { ... },
        "C": { ... }
      },
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... }
      }
    ]
    

    merge DEF result

    JSON
    [
      {
        "DataSource": { ... },
        "D": { ... },
        "Delay 6 Seconds": { ... }
      },
      {
        "DataSource": { ... },
        "F": { ... },
        "Delay 7 Seconds": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 Seconds": { ... }
      }
    ]
    

    merge ABCDEF result

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... },
        "Merge ABC": {
          ...
          "rawData": [
            {
              "DataSource": { ... },
              "B": { ... }
            },
            {
              "DataSource": { ... },
              "C": { ... }
            },
            {
              "DataSource": { ... },
              "A": { ... },
              "Delay 5 Seconds": { ... }
            }
          ],
          ...
        }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 Seconds": { ... },
        "Merge DEF": {
          ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 Seconds": { ... }
            }
          ],
          ...
        }
      }
    ]
    
  6. Re-run the playbook with the following Data Formatter tasks inserted:

    • Format ABC between Merge ABC and Merge ABCDEF

    • Format DEF 1 between Merge DEF and Merge ABCDEF

    • Format DEF 2 between Merge DEF and Merge ABCDEF

      Re-run with Format ABC, Format DEF 1 and Format DEF 2 inserted
  7. Check the merge results of the Merge ABCDEF task.
    merge ABCDEF result

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... },
        "Merge ABC": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "B": { ... }
            },
            {
              "DataSource": { ... },
              "C": { ... }
            },
            {
              "DataSource": { ... },
              "A": { ... },
              "Delay 5 Seconds": { ... }
            }
          ],
          ...
        },
        "Format ABC": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 Seconds": { ... },
        "Merge DEF": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 Seconds": { ... }
            }
          ],
          ...
        },
        "Format DEF 1": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 Seconds": { ... },
        "Merge DEF": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 Seconds": { ... }
            }
          ],
          ...
        },
        "Format DEF 2": { ... }
      }
    ]
    

TAKEAWAYS

  • In subsequent merges (e.g., Merge ABCDEF), only the last-arriving lineage from each prior merge is included as a top-level object in the merged result.

  • The number of execution lineage objects in any merge result is equal to the number of inbound connectors feeding that Merge task.