Skip to content
Article

Collecting Dynamics 365 Data with MS Forms and Power Automate

Collecting and updating data or adding records to your Dynamics 365 CRM solution through online forms is a hugely important capability for many businesses. Whether you are looking to generate new business leads or use surveys to collect feedback, allowing that data to flow seamlessly into your CRM through an online form will allow you to more effectively leverage your data and remove the time-consuming task of manual data entry or imports.

While there are quite a few methods of connecting web forms to Dynamics 365 records, most require third party solution integrations or web development skills — a major potential barrier for some SMBs considering utilizing these forms. There is however an often-overlooked solution to this problem. Using Power Automate you can seamlessly map Microsoft Forms responses into Dynamics CRM.

Because Microsoft Forms and Power Automate are included in Microsoft 365 and Dynamics 365 licenses, this method of automated data collection is incredibly cost-effective and doesn’t require any advanced coding skills or third-party platforms.

As we’ve described below, in only five steps, you can set-up a cloud flow and start building out your database with Microsoft Form responses today!

1. Create your Automated Cloud Flow in Power Automate:

Begin by opening Power Automate and create an Automated Cloud Flow.

*Note: Prior to creating your cloud flow in Power Automate, you must have already created your database fields and corresponding Microsoft Form. 

Select the trigger ‘When a new response is submitted – Microsoft Forms’:

2. Get Response Details from Microsoft Form:

When you create your flow in step #1, you’ll automatically see an action ‘When a new response is submitted’.

This action indicates that the flow will run when a new Microsoft Form response is submitted.

Select the Microsoft Form from which you are gathering responses:

You’ll also need to specify the Form response details to use to create your new CRM record. Add a new step to search for ‘Get Response Details’:

3. Create a new row in Dataverse:

In steps #1 and #2, we’ve specified which Microsoft Form to collect responses from. Now, we need to add an action to take with the response details from this Microsoft Form.

Add a step to add a new row in Dataverse. This will create a record for each Microsoft Form response submitted:

You will need to indicate the record type, or table name, to create from the Microsoft Form responses.

Once you select the table, you may see some familiar fields appear – these are the fields from your database!

Click into the fields and you’ll see a menu open on the right-hand side. These are the Microsoft Form response details that we set-up in steps #1 and #2.

Find the Microsoft Form question to map your form response details with your corresponding Dataverse record information:

Although this seems straightforward so far, we’re about to hit a rough patch.

In this example, I would like to map the ‘Lead Source’ field to an option set on my Form called ‘How did you hear about Catapult?’

Unfortunately – we can’t simply select the field and have the option values update correctly in CRM.

When an option set is selected on your Form, Power Automate will try to map the option set label (ex: Search Engine) to a corresponding option set value (ex: 100000001) in your database.

As such, there are two final steps required to transform your Microsoft Form option set labels into the database option set values.

4. Compose your Option Set Values:

After the ‘Get response details’ step in your Flow, add an action for a Compose Data Operation:

This step will hold the option set values for one of your option set questions. You will need to repeat steps #4 and #5 if you have multiple option sets in your Microsoft Form.

You need to obtain the option set values within your system customization settings:

Within the Compose step, place all your option set labels and values within curly brackets, note syntax of “ : and ,  and note that last option should not have the comma.

It is also recommended to rename the Compose step to align with your option set name, especially if you have multiple option set fields to map.

5. Transform Option Set Values:

In step #4, we’ve indicated which option set labels (ex: Search Engine) match with which option set values (ex: 100000001) in your database.

Our final step is to transform the Microsoft Form option set labels into the corresponding database option set values so the correct option set values are selected on your soon-to-be created CRM record.

Return to the ‘Add a new row’ step in your Flow, and find your option set field.

Click into the field, select ‘Expression’ from the menu and begin typing the expression:

outputs(‘Compose_Step_Name’)?[]

Make sure your cursor is in between the square brackets. Click on ‘Dynamic Content’ and find the Microsoft Form option set field. Click on the field to finish your expression:

Your final expression should be as follows:

outputs(‘Compose_Step_Name’)?[outputs(‘Get_response_details’)?[‘body/r######‘]]

Yellow: The name of the step you created with the option set labels and values in step 4

Green: The name of the step you created to get the Microsoft Forms response details

Pink: the field ID from Microsoft Forms.

You can get the green and pink values from the ‘Dynamic Content’ fields.

After these five steps, your final Flow setup will look similar to this:

And that’s it! Five easy steps to connect MS Forms to your Dynamics 365 CRM database.

This is only one of many (many!) capabilities offered by Power Automate. It is an incredibly powerful tool available to Dynamics 365 users through the Power Platform that can easily automate tasks and streamline workflows. If your business is interested in learning how the Power Platform can solve your business challenges, reach out to Catapult today.

Register to receive the latest Dynamics 365 Insights

Our proven Success Framework minimizes risk and promotes alignment to results

Explore how Catapult has helped hundreds of businesses successfully adopt cloud solutions and achieve the result they’re looking for.

  • Icon

    Learn

  • Icon

    Load

  • Icon

    Launch

  • Icon

    Level Up

Achieve out of this world results

Our easy-to-navigate Success Framework guides our customers through four critical stages that build towards successful adoption of a tailor made Dynamics 365 business solution

LEARN ABOUT OUR SUCCESS FRAMEWORK