Converting Web Forms to Dynamics 365 Leads with Microsoft Flow & Forms


There are many instances where there is a requirement to push data from a web form into Microsoft Dynamics 365.

For forms that are currently managed within a website content management system, various solutions exist for integrating these with Dynamics but in some instances the simplest solution will be use Microsoft Forms in tandem with Microsoft Flow.

This could be a requirement to connect a contact form or another type of basic form with CRM.

Microsoft Forms is an ideal starting point to quickly create a smart looking web form and best of all, it's included as part of an Office 365 account.

The first step will be to create a new Form containing each required field. Instructions for how to create a Microsoft Form are shown here.

For this example, we've created an application form in just a few minutes using the native drag and drop controls:


Once a new Form has been created it can be shared by:

  • URL - link to the Form from an email or a web page
  • IFRAME - copy and paste code to embed the Form within a web page (shown below)
  • QR - scan the code to access the form on a mobile device
Form1 5

For this example, we'll import new form submissions as Lead records in Dynamics 365 so the next step will be to check that each Form question can be mapped to an existing Dynamics 365 field on the Lead entity.

Depending on the type of Form there might one or more fields where there isn't currently a matching field on the relevant Dynamics entity. If so, these will need to be added by a Dynamics administrator before data can be mapped.

Once that's done, all Form fields can individually be mapped to the CRM entity and supporting fields.

By using Microsoft Flow to handle this process the complexity is greatly reduced compared to many other integration methods.

Navigating to Flow in the Office 365 menu, select the option to create a Flow from blank within the New menu.

To define a trigger, in the Flow search box typing 'Forms' or 'When a response is submitted' will bring up the relevant operation.

Within the Form ID the picker can be used to reference originating form:

Form0 5

This process should run each time the form is posted so an 'Apply to Each' control is dragged onto the Flow canvas. This requires an output from previous steps to be selected that will be defined as a dynamic list of response notifications:

Form2 5

To extract the data we again need to reference the Form ID to 'Get Response Details' and input a Response ID:

Form3 7

Now we've dealt with the Form the next step will be to add another action and search for Dynamics 365 selecting the 'Create a New Record' operation.

For this part, select the relevant Dynamics 365 instance where new records should be created, and what entity these should be created as.

In this example, we'll create new records as Leads:

Form0 569

For this operation, each Form field is mapped to the relevant Lead entity field. In the above example, we've referenced the First / Last name, Email and Mobile phone fields.

Once the completed Flow is saved and the associated Form is submitted the process will run as defined.

As shown below, in this example a lead record is automatically created with the form data pre-populated in these mapped fields:

Lead Top

With this data added to Dynamics there are various options for configuring further processes that will alert users that action is required. This can include:

  • Creating a dynamic list view showing recent leads created by a Form post
  • Automatically scheduling an activity that will prompt a sales user to follow up when Form leads are created
  • Sending an automated email notifying teams about a new actionable form post

Microsoft Forms won't be appropriate for all requirements and there are some limitations to be aware of. Specifically, this doesn't currently support any duplicate detection and newly created records aren't automatically linked to existing records. However, a plugin could be used to apply a link once data hits Dynamics 365 based on individual matching rules.

Also, as Forms feed data into Dynamics in text format this will require additional work where option set fields are used.

Despite these limitations, if you are looking to quickly connect a basic web form with Dynamics this combination of Microsoft Forms and Microsoft Flow could prove a cost effective solution.

RELATED: Forms Pro Becomes Dynamics 365 Customer Voice

Get Help with Forms Pro

Get in touch if you need any assistance building and distributing Forms Pro surveys, including automated triggers and tracking responses in Dynamics 365.

Request Callback