Power automate – Send an email using email template

If we have to send out an email to an user using the email template, we can send using OOB workflow.

Now with power platform, we have the option of sending out the emails to the recipients without using OOB workflows.

Let’s take a scenario of a project record being modified, the user should notified via email that the record has been assigned to him/her and further action required [change in project manager field].

Before we move further with power automate, lets have the email template ready.

For that, go to your Dynamics 365 instance, Settings –> Template –> Email Template –> Click on “New” and select the Email Template Type as GLOBAL and click Ok:

The template details shall look something as below:

The template editor is were we enter the dynamic content along with the static content, the one highlighted text is dynamic value which is mainly the subject and the email body:

Save and close the template created.

Now let’s go to Power automate.

1. In power automate, the triggering event will be “When a row is added, modified or deleted”

2. Next we need to list [get] the email templates based on the name. For the email template which I created I gave the name as “Project Assignment”

This image has an empty alt attribute; its file name is image-5.png

3. Next is loop through the email template retrieved [it should always return 1 record since we are filtering based on email template name].

4. In Apply To each we need to use Perform an unbound action. Here we specify from address which I am retrieving from the user who modified the project record. Also here we specify the recipient to [To Item – 1] whom the email should be sent.

5. The last part of the unbound action is to set the Regarding i.e., the project and associate the template which we retrieved earlier [step #2]

After we modify the project record i.e., the power automate will trigger.

Below is how the email will look like after project record was modified: