Create and Send CRM URL dynamically in Email using Power Automate Flow.

 Hello Guys,

In our previous blog we have seen how we can write and test unit test case for plugin. Today we will send URLs in email using Power Automate Flow. 



Do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

There are some scenarios where we need to send email along with some URLs. For example we have created some views which contains specific records and we want to notify user by sending email which contains URL of that view.

Now we can send the URL of the view by copying it from browser and send it in mail. But this will run only for one environment as different environment is having different guids.

Let's see how to do that. 

We will be creating one schedule flow which will retrieve Accounts and for each account it will send email along with URL.

Visit https://make.powerautomate.com/ and select your environment.



Now click on create and select schedule flow and configure it as shown below:



Now we have more than 5000 records in Accounts so we can use concept of pagination for retrieving records. We will declare one variable as shown below:



Now add one do until loop and inside the do until loop configure retrieve of accounts as shown below:



Now add one condition for checking more rows.



Now inside the yes block we will be retrieving Model Driven App first. Configure Get row step as shown below:



Now add one parse Json step and configure it as shown below:

uriHost(first(outputs('Model_Driven_Apps')?['body/value'])?['@odata.id'])

first(outputs('Model_Driven_Apps')?['body/value'])?['appmoduleid']



So here above step will give you URL which you can use in Email. You can iterate the Accounts after this step and send email along with this URL. To send Email using MS Flow you can visit this blog.

After iteration, we will increment Page Number. So configure the step as shown below:



Now inside No block configure below step which is setting Page number to 0



So our flow is ready.

Hope it helps...




Comments

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.

Understanding Business Unit in Dynamics 365.