Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

Recently I was working on a scenario where I have to automatically generate a lead record in Microsoft Dynamics CRM through a simple web contact form using MS Power Automate. Typically, when visitors visit a corporate website, they show their interest in products or services by filling in a contact form in Contact page of website. This is helpful in RPA (Robotic Process Automation) scenarios where we need to automatically generate a lead record in CRM through the information in contact form without human intervention.

So, today we will walk through an entire process step by step to understand the flow in detail.

Here are the steps we follow in our scenario – add trigger When a new email arrives, add an action HTML to Text to convert an email body to plain text.

crmleadblog - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

Next, add Compose action to split an email body into an array:

crmleadblog1 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

Now, as we have output in an array, each element a line from your email. Next, we need to add a Filter array to extract the line with ‘Name:’ and configure its condition rule to verify if current item () contains ‘Name: ‘

crmleadblog2 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

Next, we have to split Name into First and Last name – add Compose action to perform the following task:

crmleadblog3 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

In the next following steps, add a Filter array to extract the lines with ‘Email:’, ‘Company:’, ‘ Phone:’ and ‘Message:’ – add Compose action with following outputs we get from filter array.

crmleadblog4 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

crmleadblog5 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

To automate the process, we use UI Flow to generate lead record in MS Dynamics CRM through Web Contact form using MS Power Automate

crmleadblog6 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

Then send an email to CRM, admin to get approval on if the Lead can be created with approval comments.

crmleadblog7 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

If the following is Approve or Rejected, sends back an email to the requester with approver response.

crmleadblog8 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

Finally, we have successfully created lead record in MS Dynamics CRM:

crmleadblog9 - Generate Lead record in Microsoft Dynamics CRM through Web Contact form using MS Power Automate

We hope you have found it useful. For any queries, please contact info@kaispe.com

Leave a Reply

avatar
  Subscribe  
Notify of