Skip to main content
Skip table of contents

Group by Task

LAST UPDATED: JUNE 23, 2025

The Merge task’s groupBy: "Task" configuration enables merging by including only execution lineages containing the task node with the specified display name. Every execution lineage permutation containing that node, leading to the Merge task, will appear as a separate object in the final merge array.

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

Merge Condition Format

To apply this configuration, the merge condition must include at least the following two keys:

JSON
{
  "groupBy": "Task",
  "taskName": "<Display name of a task node>"
}

Core Concepts

Example 1 - Lineage Capture on Task Match

OBJECTIVE – Illustrate that the Merge task filters for and includes only the upstream lineage that contains the specified task.


  1. Build the following playbook:

  2. Input the following merge condition:

    JSON
    {
      "groupBy": "Task",
      "taskName": "A"
    }
    Frame 87 (2)-20250613-203825.png
  3. Test run the playbook.

    Frame 1 (31)-20250602-235821.png

  4. Click on the icon within the Merge task.

    Frame 88-20250613-204226.png
  5. Observe the execution results for the Merge task in the Raw Data tab.

    Frame 89-20250613-204756.png

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... }
      }
    ]
  6. Stop the test, then repeat steps 2-5, substituting "B" as the value for the taskName field in the merge condition.

    JSON
    {
      "groupBy": "Task",
      "taskName": "B"
    }

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "B": { ... }
      }
    ]
  7. Stop the test, then repeat steps 2-5, substituting "C" as the value for the taskName field in the merge condition.

    JSON
    {
      "groupBy": "Task",
      "taskName": "C"
    }

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "C": { ... }
      }
    ]

TAKEAWAY

The Merge task filters for and includes only the upstream lineage that contains the specified task.

Example 2 - Merge Results for Playbooks with Common Ancestor Nodes and Sibling Branches

OBJECTIVE – Learn how the specified task name affects merge results when parallel branches share a common ancestor node.


  1. Build the following playbook:

  2. Input the following merge condition:

    JSON
    {
      "groupBy": "Task",
      "taskName": "A"
    }
    Frame 87 (2)-20250613-203825.png
  3. Test run the playbook.

    Frame 1 (31)-20250602-235821.png

  4. Click on the icon within the Merge task.

    Frame 90-20250613-222128.png
  5. Observe the execution results for the Merge task in the Raw Data tab.
    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "A2.1": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "A": { ... },
        "A2.2": { ... }
      }
    ]
  6. Stop the test, then repeat steps 2-5, substituting "A2.1" as the value for the taskName field in the merge condition.
    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "A2.1": { ... }
      }
    ]
  7. Stop the test, then repeat steps 2-5, substituting "A2.2" as the value for the taskName field in the merge condition.
    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "A2.2": { ... }
      }
    ]

TAKEAWAYS

  • When the taskName key matches a task that splits into parallel branches, the Merge task includes a lineage object for each resulting branch.

  • When the taskName key matches a task within a single sibling branch, the Merge task excludes nodes from the other sibling branch.

Example 3 - The Impact of Unwind Task on Merge Results

OBJECTIVE – Learn that each completed execution lineage leading to the Merge task produces a separate lineage object in its array output.


  1. Build the following playbook:

  2. Input the following JSON data for the Unwind A task:

    JSON
    [
      { "id": 1, "name": "Object 1"},
      { "id": 2, "name": "Object 2" },
      { "id": 3, "name": "Object 3" },
      { "id": 4, "name": "Object 4" }
    ]
Frame 91-20250613-235503.png
  1. Input the following JSON data for the Unwind B task:

    JSON
    [
      { "id": 5, "name": "Object 5" },
      { "id": 6, "name": "Object 6" },
      { "id": 7, "name": "Object 7" },
      { "id": 8, "name": "Object 8" }
    ]
    b0700d79-0f7d-416b-a6ba-35646a9bbc2e.png
  2. Input the following merge condition:

    JSON
    {
      "groupBy": "Task",
      "taskName": "Unwind A"
    }
    Frame 94 (1)-20250614-004440.png
  3. Test run the playbook.

    Frame 1 (31)-20250602-235821.png

  4. Click on the icon within the Merge task.

    Frame 93-20250614-000518.png

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... }
      }
    ]
  5. Stop the test, then repeat steps 4-6, substituting "Unwind B" as the value for the taskName field in the merge condition.

    JSON
    {
      "groupBy": "Task",
      "taskName": "Unwind B"
    }

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... }
      }
    ]
  6. Stop the test, then repeat steps 4-6, substituting "Unwind B" as the value for the taskName field in the merge condition.

    JSON
    {
      "groupBy": "Task",
      "taskName": "AB"
    }

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "AB": { ... },
        "Merge": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind A": { ... },
        "AB": { ... }
      }
    ]

TAKEAWAYS

  • Each completed execution lineage upstream of the Merge task that includes the specified task in the merge condition generates an additional object in the final merge array.

  • If the task specified in the merge condition is an Unwind task, the number of objects in the final merge array—unless limited by the "count" merge condition key—will equal the number of top-level objects elements deconstructed by the Unwind task.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.