Create or join parallel branches for workflow actions in Azure Logic Apps

By default, your actions in logic app workflows run sequentially. To perform independent actions at the same time, you can create parallel branches, and then join those branches later in your flow.

Tip

If you have a trigger that receives an array and want to run a workflow for each array item, you can debatch that array with the SplitOn trigger property.

Prerequisites

Add parallel branch

To run independent steps at the same time, you can add parallel branches next to an existing step.

Run steps in parallel

Your logic app waits for all branches to finish before continuing workflow. Parallel branches run only when their runAfter property values match the finished parent step's status. For example, both branchAction1 and branchAction2 are set to run only when the parentAction completes with Succeeded status.

Note

Before you start, your logic app must already have a step where you can add parallel branches.

  1. In the Azure portal, open your logic app in Logic App Designer.

  2. Move your pointer over the arrow above the step where you want to add parallel branches. Choose the plus sign (+) that appears, and then choose Add a parallel branch.

    Add parallel branch

  3. In the search box, find and select the action you want.

    Find and select the action you want

    Your selected action now appears in the parallel branch, for example:

    Find and select the action you want

  4. Now, in each parallel branch, add the steps you want. To add another action to a branch, move your pointer under the action where you want to add a sequential action. Choose the plus (+) sign that appears, and then select Add an action.

    Add sequential action to parallel branch

  5. In the search box, find and select the action you want.

    Find and select sequential action

    Your selected action now appears within the current branch, for example:

    Find and select sequential action

To merge branches back together, join your parallel branches.

Parallel branch definition (JSON)

If you're working in code view, you can define the parallel structure in your logic app's JSON definition instead, for example:

{
  "triggers": {
    "myTrigger": {}
  },
  "actions": {
    "parentAction": {
      "type": "<action-type>",
      "inputs": {},
      "runAfter": {}
    },
    "branchAction1": {
      "type": "<action-type>",
      "inputs": {},
      "runAfter": {
        "parentAction": [
          "Succeeded"
        ]
      }
    },
    "branchAction2": {
      "type": "<action-type>",
      "inputs": {},
      "runAfter": {
        "parentAction": [
          "Succeeded"
        ]
      }
    }
  },
  "outputs": {}
}

Join parallel branches

To merge parallel branches together, just add a step at the bottom under all the branches. This step runs after all the parallel branches finish running.

Join parallel branches

  1. In the Azure portal, find and open your logic app in Logic App Designer.

  2. Under the parallel branches you want to join, choose New step.

    Add step to join

  3. In the search box, find and select the action you want as the step that joins the branches.

    Find and select the action that joins parallel branches

    Your parallel branches are now merged.

    Joined branches

Join definition (JSON)

If you're working in code view, you can define the join structure in your logic app's JSON definition instead, for example:

{
  "triggers": {
    "myTrigger": { }
  },
  "actions": {
    "parentAction": {
      "type": "<action-type>",
      "inputs": { },
      "runAfter": {}
    },
    "branchAction1": {
      "type": "<action-type>",
      "inputs": { },
      "runAfter": {
        "parentAction": [
          "Succeeded"
        ]
      }
    },
    "branchAction2": {
      "type": "<action-type>",
      "inputs": { },
      "runAfter": {
        "parentAction": [
          "Succeeded"
        ]
      }
    },
    "joinAction": {
      "type": "<action-type>",
      "inputs": { },
      "runAfter": {
        "branchAction1": [
          "Succeeded"
        ],
        "branchAction2": [
          "Succeeded"
        ]
      }
    }
  },
  "outputs": {}
}

Get support

Next steps