In this blog, we will understand How to Send Emails using Email Templates with Power Automate Flow.
Use Case: In my example, send emails using Email Templates with Power Automate.
Follow the following steps to use email templates with Power Automate.
Step 1 – Configure the Email Template
Go to Advanced Settings in Power Apps and choose Templates -> Email Templates.
Create a New Email Template with Template Type as Account and Specify Subject and Body using Dynamic content and Images as needed.
Use the Template Editor section to create the template.
Save the Template once created.
Step 2 – Configure Power Automate flow to Call Email Template.
Go to Power Automate, select instant flow, and create a new flow.. You can create automated flow also. after the trigger add the following action steps.
1. Get a List using Dataverse Connection
2. Get Row by ID using Dataverse Connection
3. Get Template ID from Templates
4. Use SendEmailFromTemplate action with Perform UnBound Action
1. The TemplateId is the ID of the Email template record.
2. Regarding the record against which the Email activity will be created.
3. Target is the JSON object containing the Recipients.
4. The JSON object looks like the one below.
{
"email_activity_parties": [
{
"partyid_systemuser@odata.bind":
"/systemusers(@{outputs('Get_a_row_by_ID')?['body/_ownerid_value']})",
"participationtypemask": 1
},
{
"partyid_account@odata.bind":
"/accounts(@{outputs('Get_a_row_by_ID')?['body/accountid']})",
"participationtypemask": 2
}
],
"@odata.type": "Microsoft.Dynamics.CRM.email"
}
Now the flow is complete you can save and test. The complete flow will look like below.
After testing you can see the activity in the Timeline control against the record.