How to Send Automated Emails from Dynamics 365 CRM Using Email Templates and Power Automate

TM_email using flow
TM_email using flow

Microsoft Dynamics 365 CRM provides robust email capabilities through Email Templates, enabling organizations to maintain consistent and professional communication. When combined with Power Automate, these templates can be triggered automatically based on business events, reducing manual effort and improving operational efficiency.

This article explains how to send emails from Dynamics 365 CRM using Email Templates and Power Automate.

Article Scope

This guide covers:

  • Overview of Dynamics 365 Email Templates
  • Required permissions, licenses, and setup
  • Creating Email Templates in Dynamics 365
  • Building a Power Automate flow to send emails
  • Using Perform a bound action with Email Templates
  • Troubleshooting common issues
  • Best practices and real-world use cases

Audience:
Dynamics 365 users with basic CRM knowledge who are new to Power Automate.

1. Overview of Dynamics 365 Email Templates

What Are Email Templates?

Email Templates in Dynamics 365 are predefined email messages that include:

  • Subject and body content
  • Dynamic placeholders linked to CRM fields
  • Entity-specific context (Case, Lead, Contact, etc.)

When an email is sent using a template, Dynamics 365 automatically replaces placeholders with data from the related record.

Benefits of Using Email Templates with Power Automate

  • Consistent and standardized communication
  • Reduced manual email composition
  • Automated, event-driven email delivery
  • Full email tracking within Dynamics 365

2. Prerequisites

2.1 Required Permissions

The user must have one of the following roles:

  • System Administrator
  • System Customizer

Additionally, the user must have permission to:

  • Create and run Power Automate flows
  • Access Dataverse tables and actions

2.2 Licensing Requirements

  • Dynamics 365 license (Sales, Customer Service, or equivalent)
  • Power Automate license (included with most Dynamics 365 plans)

2.3 Technical Setup

Ensure the following configurations are complete:

  • Server-Side Synchronization enabled
  • Sender mailbox approved and tested
  • Power Automate environment connected to the same Dataverse instance

3. Creating an Email Template in Dynamics 365

Step 1: Navigate to Email Templates

  1. Open Dynamics 365
  2. Go to Advanced Settings
  3. Navigate to
    Settings → Templates → Email Templates

Step 2: Create a New Template

  1. Select New
  2. Choose the Entity Type (for example, Case)
  3. Click OK

Email templates are entity-specific and can only be used with the selected entity.

Step 3: Define Template Content

Enter the following:

  • Title: Case Created Notification
  • Subject: Case {{ticketnumber}} Created

Step 4: Insert Dynamic Fields

Use Insert → Dynamic Values to add entity fields.

Sample Email Body

Hello {{customerid}},

Your support case "{{title}}" has been created successfully.
Case Number: {{ticketnumber}}

Our support team will contact you shortly.

Step 5: Save and Publish

  1. Click Save
  2. Click Publish

The email template is now available for automation.

4. Creating a Power Automate Flow

Scenario

Automatically send an email when a Case record is created, using a Dynamics 365 email template.

Step 1: Create an Automated Cloud Flow

  1. Open Power Automate
  2. Select Create → Automated cloud flow
  3. Name the flow:
    Send Case Email Using D365 Template
  4. Select trigger:
    Dataverse – When a row is added
  5. Click Create

Step 2: Configure the Trigger

Set the following values:

  • Change Type: Added
  • Table Name: Cases
  • Scope: Organization

Step 3: Retrieve the Email Template

Add action:

  • Dataverse → List rows

Configuration:

  • Table Name: Templates
  • Filter Rows: title eq 'Case Created Notification'
  • Top Count: 1

Step 4: Retrieve the Case Record (Recommended)

Add action:

  • Dataverse → Get a row by ID

Configuration:

  • Table Name: Cases
  • Row ID: Case ID from the trigger

5. Sending the Email Using Perform a Bound Action

This is the recommended and supported approach for sending emails from Dynamics 365 Email Templates in Power Automate.

Step 5.1: Add Perform a Bound Action

  1. Select New step
  2. Choose Dataverse
  3. Select Perform a bound action

Step 5.2: Configure the Bound Action

Table Name

Email Templates (Templates)

Row ID

Select the Template ID from the “List rows” action.

Example:

value[0].templateid

Action Name

SendEmailFromTemplate

Step 5.3: Configure Action Parameters

Regarding

  • Provide the Case ID
  • Required for placeholder resolution and tracking

Target

Cases

Recipient (To)

The Recipient parameter defines who will receive the email.
This field expects a Party List, not a plain email address.

You must pass the recipient using the following syntax structure:

[
  {
    "partyid_contact@odata.bind": "/contacts(<CONTACT_GUID>)"
  }
]

Example: Send Email to the Primary Contact of a Case

If your Case has a Primary Contact, use its Contact ID:

[
  {
    "partyid_contact@odata.bind": "/contacts(@{outputs('Get_a_row_by_ID')?['primarycontactid']})"
  }
]

Example: Send Email to a Customer (Account)

[
  {
    "partyid_account@odata.bind": "/accounts(<ACCOUNT_GUID>)"
  }
]

Use contacts, accounts, systemusers, or queues depending on your business requirement.

Sender (From)

The Sender parameter defines who sends the email.
For automated emails, using a Queue is recommended.

This field also requires a Party List.

Example: Send Email from a Queue (Recommended)

[
  {
    "partyid_queue@odata.bind": "/queues(<QUEUE_GUID>)"
  }
]

Example: Send Email from a System User

[
  {
    "partyid_systemuser@odata.bind": "/systemusers(<USER_GUID>)"
  }
]

Key Notes for Sender and Recipient

  • Always use GUIDs, not names or email addresses
  • Sender mailbox must be:
    • Approved
    • Enabled for server-side sync
  • Queue-based senders are best for:
    • Automation
    • Compliance
    • Ownership independence

Why Use Perform a Bound Action?

  • Ensures template placeholders are resolved correctly
  • Creates a tracked email activity in Dynamics 365
  • Uses native D365 email processing
  • Supports enterprise compliance and auditing

6. Save and Validate the Flow

  1. Save the flow
  2. Create a new Case record
  3. Verify:
    • Email is delivered successfully
    • Dynamic fields are populated
    • Email appears in the Case timeline

7. Common Issues and Troubleshooting

Email Not Sent

  • Verify mailbox approval
  • Confirm server-side synchronization is enabled

Template Fields Not Replaced

  • Ensure Regarding and Target values are set correctly
  • Confirm template entity matches the record entity

Permission Errors

  • Ensure the flow owner has Dataverse access
  • Re-authenticate Dataverse connections if required

Best Practices

  • Use Queues for automated emails
  • Maintain entity-specific templates
  • Apply consistent naming conventions
  • Test flows in non-production environments
  • Add error handling using Scope actions

Common Business Use Cases

  • Case creation notifications
  • Lead assignment alerts
  • Opportunity stage updates
  • Order confirmations
  • SLA and escalation emails

Related Post

Leave a Reply

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