In this Power automate tutorial, we will learn how to work with parallel branch on a flow in Power Automate. Also, we will discuss the below topics using a Parallel Branch with examples such as:
- What is a parallel branch in Power Automate?
- Power Automate parallel branch in condition
- Power Automate parallel branch limit
- Power Automate adds a parallel branch
- Power Automate parallel branch join
- Power Automate terminates the parallel branch
- Power Automate parallel branches apply to each
What is a parallel branch in Power Automate?
Normally, when we will create a flow in Power Automate, it will create a sequential flow. Meaning the flow actions will execute one by one till the flow completes.
For example, in the case of a leave request flow in Power Automate, the flow actions will execute one by one like below:
- User submits a leave requests
- Approval will go to the team lead
- Then Once the Team lead approves, another approval will go to the Manager
- And if the manager approves then another approval will go to HR, etc like this.
One after another, the flow actions will execute, you can check out an article on Leave Request Approval Flow using Power Automate or Microsoft Flow.
But there will be scenarios where we want to run two or more steps simultaneously. Microsoft provides the option of creating parallel branches in a flow so that two or more steps will execute at the same time.
For example, If an employee submits a laptop request, then you might want to send an approval to both Manager and the Finance Team. In this scenario, we can use a parallel branch inside the flow in Power Automate.
Read Power Automate Multiple Conditions
How do I add a parallel branch to Power Automate?
If you are using Power Automate, you can get this option when we insert a new step in between trigger and action or two actions in a flow like the below:
In a Parallel branch, each branch is independent of the other. Before creating the flow, make sure to log in the Power Automate with your office 365 tenant address.
Create Flow with Parallel Branch in Power Automate
Let’s see how to use this parallel branch in a Power Automate flow. For example, we will create a flow that will trigger when an email receives. Then it will retrieve the attachment and store those attachments within the SharePoint document library.
Step-1:
On Power Automate, click on + Create > Automated Cloud Flow > Select the trigger ‘When a new email arrives (V3)’ > Give a name to the flow > Create.
It will create the flow and then select an email folder i.e., Inbox. Also, expand the ‘Show advance options‘ and set the ‘Include attachments‘ to Yes.
Step-2:
Next, we will add an action that will get the attachments from the emails. Click on + New step > Get Attachment (V2). Then set the Message-Id and Attachment Id from the dynamic content.
Note- It will create an ‘apply to each’ loop that will apply to each attachment.
Step-3:
After getting the attachments, it will upload the files inside the document library. Click on +New step > Create file. Provide the Site Address, Folder path, Filename, and file content from the dynamic content.
But as per our requirement, we want to upload these attachments to multiple document libraries. So we will add a parallel branch. In between the get attachment and create file action, click on the + symbol to add a parallel branch.
Then add another ‘Create file‘ action and provide a different Sharepoint location.
Now the flow is ready. Click on Save > Test > Manually > Run flow. For testing purposes, send an email with attachments to yourself.
We can see it will create a file in both SharePoint document libraries at the same time.
This is how a Parallel branch works using Power Automate.
Read Power Automate email body formatting
Power Automate parallel branch in condition
The parallel branch does not allow to work within the condition. But we can create a parallel branch first and then put conditions inside each branch or for both branches. Let us take an example where we will see how to use a parallel branch using conditions in Power Automate.
- For example, when an employee applies for a travel request it will notify both HR and the manager at the same time.
- If both the responses are approved then the request will be notified as approved.
- Similarly, if both the responses or one of the responses is not approved then the request will be notified as rejected.
Step-1:
Here we have prepared a SharePoint list named ‘Travel request’, where the employee inserts the details of his travel request. The list has some columns such as:
Columns | Type |
Title | Single line of text |
From | Date and Time |
To | Date and Time |
Status | Choice(Approved, Rejected) |
HR Comment | Single line of text |
Manager Comment | Single line of text |
Step-2:
Now we will move to create a flow that will trigger when an item is created in the specified SharePoint list. On Power Automate, click on + Create > Automated cloud flow > select the trigger ‘When an item is created‘ > create. Give a name to the flow.
Step-3:
Next, we will add an action that will get the user profile who created the request. Click on + New step > select the action ‘Get user profile‘. Set the user(UPN) as Created by email.
Step-3:
Then, we will add an action that will start the approval request and wait for the responses from the approvers. Click on + New step > select the action ‘Start and wait for the approval. Set the properties such as:
- Approval type– Approve/Reject – Everyone must approve
- Title– Give a title of the request
- Assigned to provide an assigner’s email
- Details– Give the details of the request
Step-4:
Now we will add a parallel branch that will send an approval request to other approvers at the same time.
Click on the + symbol in between the ‘Get user profile’ and ‘Start and wait for the approval. Then select ‘Add a parallel branch. Then add another ‘Start and wait for an approval action. Set the properties as previously.
Step-5:
Now, we will add a condition for both branches. That will check whether both responses are approved or not. Click on +New step > Condition. And set the values as:
- The outcome is equal to Approve
- The outcome is equal to Approve
Note- Both the outcome comes from both ‘Start and wait for an approval’ actions.
Step-6:
If the condition satisfies then it will move to the ‘If yes’ section. Send an email notification to the creator or user that his request has been approved. Otherwise, it will move to the ‘If no‘ section and notify the user that his request has been rejected.
Inside the If yes section, click on + Add an action > Send an email. Set the properties such as:
- To– Select ‘mail‘ from the dynamic content of getting user profile action.
- Subject– Give a subject to the email.
- Body– Specify the body of the email.
Similarly, repeat this action in the If no section.
Step-7:
In this last step, we will add an action in both sections that will update the comments and the status in the SharePoint list. Click on + Add an action > Update item. Specify the site address and the list name. Give the ID and Title from the dynamic content.
In the status, set it as Approved (in the case of ‘If yes’). Also, set the HR comments and the manager comments as ‘Responses comments’ from the dynamic contents of each action.
Now the flow is ready to run. Click on save > Test > Manually > Runflow. For testing purposes, let us create an item in the specified SharePoint list.
Then it will notify the specified approvers to respond to the requests via Outlook. Let both the approvers approve the requests with comments. Then it will come like below:
This is how to use the Power Automate Parallel branch with conditions.
Power Automate parallel branch limit
There is a limitation to using the Parallel branch in Power Automate. It allows us to configure up to 50 parallel branches in a single flow.
Power Automate adds a parallel branch
In this example, we will see how to add a parallel branch to an existing flow. We have prepared a SharePoint list named ‘Task list’ having some columns such as:
Columns | Types |
Title | Single line of text |
Description | Single line of text |
Assigned To | Person or Group |
Start Date | Date and Time |
End Date | Date and Time |
We have created an automated flow that will trigger when an item is created in the task list and create a task in the planner. The flow will look like the below:
We have added another action to update the task details:
Now, we will see how to add a parallel branch inside this existing flow. For example, when an item is created in the list, it will create a task in the planner, and also, at the same time, it will notify the user who is assigned to the task via the Microsoft team.
For this, we need to add a parallel branch inside this flow. Click on ‘+‘ in between the trigger and the action. Then select the ‘Add a parallel branch.
Next, we will add an action ‘Post message in a chat or channel‘ that will notify the assignee about the task with a team message. Select the action and set the properties like below:
- Post-as- Flow bot
- Post-in- Chat with flow bot
- Recipient- Select the ‘Assigned To email’ from the dynamic content.
- Message- Specify the message that will post to the Microsoft Team.
Here the trigger acts as a Parent where both the branches act as child actions. Let us save the flow and click on Test > Automatically > With a recently used trigger > select the previous successful test > Test. We can see it will create a task in the planner and at the same time it will notify the assigned user via Teams.
This is an example of how to add a parallel branch in an existing flow and how it works in Power Automate.
Read Power Automate create a task in Microsoft Planner
Power Automate parallel branch join
Similarly, here we will see how to join a parallel branch in Power Automate. Let us take the above example, where we will join the parallel branch and add an action to proceed.
To join the parallel branch, click on the + New step.
Search the action ‘Send an email’ > select it.
Set the properties such as:
- To– Give an email id to whom you want to send the email.
- Subject– Give a subject to the email.
- Body– Specify the body of the email.
Now save the flow. Select to test it automatically. Run the flow. We can see after creating the planner task and posting the message in Teams, it will notify the specified user via outlook.
This is how to re-join branching after adding a new branch in Power Automate.
Read Power Automate create a task in Microsoft Planner
Power Automate parallel branch terminates
In Power Automate, the terminate action is used to terminate or end the execution process of a flow.
This action will control the status that is selected by us i.e. failed, succeeded, canceled, and Enter a custom value.
- If we select failed, it will ask to give an error code and error message. Then the flow will terminate.
- If you select the canceled, it will cancel the flow and then terminate the flow.
- Similarly, If we select succeeded, it will complete the flow and then terminate.
Let’s take the previous flow that we have created as an example. As per that scenario, when an item is created in the task list, it will create a task in the Microsoft Planner and then update the task details.
In that flow, we will add a terminate action by creating a parallel branch. That will terminate the flow once the task is created in the planner.
Click on the + symbol in between the actions > select ‘Add a parallel brach‘ > search and select the action ‘Terminate‘. Set it as Succeeded.
Now save the flow and test it, then run the flow. We can see it will terminate the flow successfully.
Similarly, if we set the status as ‘failed’ and give an error code as well as the message, then it will show the code with an error message even after the flow ran successfully.
This is how to terminate a parallel branch in Power Automate.
Read Power Automate Copy Folders
Power Automate parallel branches apply to each
In this example, we will see how to use a parallel branch inside the ‘apply to each‘ loop. For example, there is an opening in a certain company and the user sends his resume to that company’s career site or specified email address. Then it will redirect to recruiters with attachments via Outlook.
Let us create an automated flow. The following steps are:
Step-1:
On Power Automate, click on + Create > Automated Cloud Flow > Select the trigger ‘When a new email arrives (V3)‘ > Create. Select the arrived email location i.e. Inbox.
Step-2:
Next, we will add an action that will get the attachments from the email. Click on + New step > Search and select the action ‘Get attachment‘. Set the message-id and the attachment-id from the dynamic content. It will create an ‘apply to each‘ loop automatically.
Step-3:
After getting the attachments, we will add a ‘Send an email action that will send an email to the specified user (recruiter1) including the attachments.
- Inside the ‘Apply to each‘, click on + Add an action > Send an email. Set the properties such as To, subject, and the body of the email.
- To add the attachments dynamically, expand the advance option. In the attachment’s name, give a name to the attachment, and in the attachment’s content, select the content bytes from the dynamic content.
Step-3:
Again we will send this email to another recruiter. For this, we will add a parallel branch in between the get attachments and the send email action.
Click on the + symbol > Add a parallel branch. Add a ‘Send an email action. Set the properties as previously. Then the flow will look like the below:
Now the flow is ready to run. Let us save the flow. Then click on Test > Manually > Runflow. For testing purposes, send an email to yourself including attachments.
We can see once the email arrived in our inbox, it will forward to both recruiters as well.
This is how the power automate parallel branch applies to each action works.
You may like the following Power Automate tutorials:
- Power Automate IF Expression [With 51 Examples]
- Power Automate Copy Files
- Power Automate Create PDF
- Start and wait for an approval Power Automate
- Power Automate dynamic content
- Power Automate shared mailbox
- Power Automate IF Expression
- Power Automate formatdatetime
Conclusion
From this Power Automate Tutorial, we discussed everything about Power Automate Parallel branches. Also, we had discussed all these below topics:
- What is Power Automate Parallel Branch?
- How to use conditions in Power Automate parallel branch?
- What is the limitation Power Automate parallel branch?
- How to add a parallel branch in Power Automate?
- How to join Power Automate parallel branch?
- How to terminate Power Automate parallel branch?
- How to use apply to each Power Automate parallel branch?
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com