Recently we received a requirement to integrate a mailbox not configured in CRM and external to CRM with Dynamics 365.

The client had an enquiry mailbox, and they did not want the emails to be created in CRM, and therefore it was not configured. However, they did want that the lead should be automatically created for all enquiries received. That is where Microsoft Flow came to the rescue. Using Flow, it is possible to design process flows to automate integrations with external systems.

Here we discuss the steps to create a lead in Dynamics CRM for every email received on a Gmail id.

Steps to create the flow:

2. Click on ‘Create from Blank’ button as shown in the screenshot below;

3. Select ‘Gmail – When a new email arrives’, it will then ask you for the Gmail credentials, enter the appropriate credentials.

4. Now select ‘Inbox’ as seen in the screenshot below;

5. Next, click on ‘New step’ button and select ‘Add an action’ as seen in the screenshot below;

6. Then select ‘Dynamics 365 – Create a new record’ as seen in the screenshot below;

7. Selecting the above option allows us to enter the Organization Name, Entity name of the records we need to create in Dynamics 365 when an email is received, and we can also specify the field mapping as shown below. Once the mapping is done, click on ‘Create Flow’.

The lead will be created in CRM with this mapped data, and the body of the email is copied to lead notes.

8. Then click on ‘Done’, and the flow is now ready to use.

9. Now whenever we receive an email on Gmail, the lead will be created in CRM. Also, we can see the status in ‘My flows’ list as shown in the screenshot below;

Conclusion:

Using Microsoft Flow, users can easily create and automate workflows across multiple applications, in this case, Gmail & Dynamics 365. Once a flow is configured, it can be managed on desktop or mobile device and gives users an unprecedented ability to automate.