Power Automate Condition Based on Form Response Example

Are you in need of applying conditions based on Microsoft form responses? This tutorial is for you. Here, we will see how to apply conditions based on Form Response using Power Automate flow.

Scenario:

The flow triggers automatically; I have created a Microsoft Form called Task Status. So whenever a user fills the response, it checks the conditions that the task end date is equal to today, and the task status is either in progress or yet to start. If yes, it creates a task in the planner and sets the due date value as two days later than the current date value.

Check Conditions Based on Form Response using Power Automate

Using Power Automate flow, let us see how to check conditions based on form response.

To achieve this, follow the below steps:

Step 1:

Create a Microsoft Form, click on the Office 365 app launcher, then select Forms -> New Form.

Example to check conditions based on form response using Power Automate

Add the questions below by selecting the New icon.

QuestionQuestion Type
EmployeeNameText type
Task NameText type
Task StatusChoice type
StartDateDate type
EndDateDate type

Once your Microsoft form is done, it looks like below: click on the share icon and copy the form link to share with users.

power automate condition based on form response

Step 2:

To create a Flow, log in to Power Automate, click the Create icon, and select Automated Cloud Flow.

How to check conditions based on form response using flow

Now provide the Flow name, then select the trigger i.e. When a new response is submitted. Then click on Create.

How to check conditions based on form response using Microsoft flow

Step -3:

Expand the trigger and select the Form ID from the dropdown list.

condition based on form response in Power Automate

Step-4

Select + new step and add a get response details action from action triggers. Configure the Form ID from the dropdown list, and in Response ID, select the response ID from the dynamic content.

condition based on form response in Power Automate flow

Step-5

Add a condition control and check if the end date is equal to today,

formatDateTime(utcNow(),'yyyy-MM-dd')
  • Add Group and select TaskStatus is equal to InProgress and Yet to Start. If yes, then create a task (preview) from the action triggers.
  • Pass the required parameters of Group ID, Plan ID, Title, Buckted ID, and Start Time from the dynamic content value.
  • In the end Time set the due date as two days later than the current date. So here I have calculated based on the submit date from the Microsoft Forms dynamic content value.
addDays(outputs('Get_response_details')?['body/submitDate'],2)

Set the red label field as Yes, and set the priority value as 1 to set the task as urgent.

Example to check conditions based on form response using flow

Step-6

Save and Run the flow. Fill in the form details and click submit.

Conditions based on form response using Power Automate

Once the form is submitted, the flow triggers and runs successfully like below:

Conditions based on form response using the Power Automate flow

Now we can check the Planner, it automatically creates a task on the selected bucked ID.

Conditions based on form response using Power Automate flow

Also, it automatically sends an email to the responded mail from the planner like the one below.

Microsoft power automate condition based on form response

This is how to check conditions based on form response using Power Automate flow.

Conclusion

In this Power Automate tutorial, we have learned how to apply conditions based on Form Response and create a task in a planner with a due date two later than the submission date if the task is not completed, using Microsoft Flow or Power Automate.

You may also like:

>