Generate more leads with the Microsoft ecosystem

Generate more leads with the Microsoft ecosystem

Have you wondered how you can collect more leads and automatically populate them into your CRM system? I will show you how you can do that by using all Microsoft tools.

Many times, I have encountered that I must create or update records in Dynamics 365 Sales automatically from different sources. And the easiest way to do that is always by using Power Automate flow. But when we populate the form there are always different types of fields that I need to deal with. And of them is option set type. I always wanted to populate the field with the type of option set in the easiest possible way so that I don’t have to complicate my Power Automate flow too much.

I found a way to populate this field with easy future maintenance so that it is not very complicated to update a flow if there are some updates on a form in the future.

  • The first thing is to create a form that will be used to capture all your leads for your CRM. Go to and create a form that you can publish and use to capture your leads.
  • The next thing for you to set up is Power Automate. With this tool, you will be able to automatically capture your leads and pass the data to your CRM.
  • The first thing for your Power Automate Flow is to choose the trigger and that would be “When a new response is submitted” from Microsoft Forms. Choose your previously created form so that this flow will work only when this form is populated by the users.
  • The next step is to “Get response details” which you need to select the form that you have previously created and pass the Response ID from the previous step.
  • Now is the part where we are working with option set values from our form. You need to create the Compose step which will hold all your options from your option set field. Here is the syntax of how I set it up for my field:
	"Linkedin": "956430000",
	"X": "956430001",
	"Instagram": "956430002",
	"Threads": "956430003"
  • You can find your reference ID numbers for your option set fields on the Dynamics 365 Sales admin page.
  • The next thing is to add another compose action which will grab dynamic data from a drop-down field from your form.
  • The last step in Power Automate flow is “Add a new row”, which is a step used to automatically add responses from MS forms into Dynamics 365 CRM.
  • When you are populating the drop-down field, you need to choose “Enter custom value”.
  • Then click on the expression button, so that you can enter a custom expression for the drop-down field.
  • And at the end enter the custom code so that you can get the right dynamic value populated into your field. Code bellow:
  • Once you finished all the steps before and tested your MS forms by submitting some answers, you can investigate Dynamics 365 and see if your new automation worked like it should, example below:

With this method of populating your option set fields with Power Apps flow, you will be able to easily maintain your flow because you will not complicate it with many switch statements, and you will be able to easily maintain that flow if a new value is added to the option set field with just one new row inside of the compose action.

I hope that this blog will help you automate your lead generation. Stay tuned for more tips and blogs soon!

Leave a Reply

Your email address will not be published. Required fields are marked *