Sending Emails to all customers using Power Automate

Sending Emails to all customers using Power Automate

Recently in the forums, there were a few questions on how to send emails to all of my customers. While there might be different options, and the right solution to this might greatly depend on the frequency that you need to be sending this as well as the number of contacts, I thought I would demonstrate a few different approaches to implement this using Microsoft Power Automate.

This post will cover the following three different scenarios mentioned below:

  • Send Emails to the Primary Contact a selected group of Accounts
  • Send Email to All Contacts associated with an Account
  • Send a scheduled email to all Accounts

When sending the email you also have different choices of Sending the email.

You can send the email using the Outlook 365 Connector, or the Common Data Service Connector. When sending the email using the Common Data Service (Current Environment) Connector you can create the email message and send it, or you can use an email template to send the email message.

The main thing that we would want to consider when sending email to a mass amount of customers is the limits that we have on performing Power Automate actions and limits of Bulk email against Exchange Server. See the links at the bottom of the post on Power Platform and Exchange limits.

Scenario 1: Send Email to Primary Contact of a selected group of Accounts

For the first scenario, sending an email to the Primary Contact for a selected group of accounts, I created a flow with a trigger of when a record is selected, and added an Input for Outage Date. This flow will send a notification to all selected accounts for a coming outage. There are two additional actions, which are to get the Contact record of the Primary Contact in order to be able to retrieve Contact Information and the email address, and a final step that will send the email. The image below shows how the Flow will look.

Send Email to all customers using Power Automate

Once the flow has been completed we will be able to see the results. The two screenshots below show the calling of the flow and providing the outage date, and then the flow run results as well as the email message that was generated.

Send Email to all customers using Power Automate
Send Email to all customers using Power Automate

Scenario 2: Send Email to All Contacts associated with an Account

For the second scenario, I will be sending an email to all the associated contacts to a particular account. We will use a similar trigger for the selection of the account, but in this case, we are not going to required any input.

The first thing that we need to do is retrieve all of the Contact records that are associated with that account. We will use the List records action of the CDS (Current Environment) connect to retrieve all the associated contacts. I am using a fetchXml in this case to create the linked entity.

Next, we will use an apply to each control action, and create the email message and send it. We will specify the subject, description, regarding and the To Party of the email.

Finally, we will call the Bound action Send Email on the Email Message entity. The image below shows the final result of the Power Automate flow.

Send Email to all customers using Power Automate

Once the flow has been completed we will be able to see the results. Since this flow was using the Email Messages entity for sending of the email, we will see the results in CRM. The four screenshots below show the calling of the flow, and then the flow run results as well as the email messages that were sent and the content of an individual email message.

Send Email to all customers using Power Automate

Send Email to all customers using Power Automate

Send Email to all customers using Power Automate

Send Email to all customers using Power Automate
Scenario 3: Send Scheduled Email to Primary Contact associated with all Account records

In our third scenario we will create a scheduled flow that will execute every month, retrieve the primary contact for each account and send an email message to that contact containing maintenance notices.

We start this by adding a recurrence trigger that will execute every month. You can change the schedule as you need. Run it on a daily, weekly or monthly basis, or if this needs to execute every few hours, that is fine too. We then call the List records CDS action to retrieve account records. I used a query this time with the expand option to retrieve the Account and Contact record in one run, so that I don’t have to call a second Get record action for each contact.

Finally I add an Apply to each Control action that will Send an email to each individual record. The image below shows the finalized flow for the last scenario.

Send Scheduled Email to all customers using Power Automate

To test the final scenario, I performed a manual execution of the flow, by selecting Test Flow, and the selecting the option of I’ll perform the trigger action. In the Run flow window, we just click on the Run flow button to execute the flow. The screenshot below shows the execution of the flow, and the 10 email messages that were sent out.

Send Scheduled Email to all customers using Power Automate

There isn’t one option that is going to work for everyone, but in this simple post, I demonstrated three different options where you can select one or a combination of options to send email to your customers. Remember the limitations that I mentioned earlier, which are shown below.

Hope this helps resolves anyone’s issues with sending bulk emails to their customers.

For information about the Power Automate and Power Platform request limits, see the Request limits and allocation document here.

Power Platform request limits and allocations

For information about Sending limits using Office 365 Plans, see the Exchange Online limits documentation and review the Sending limits section:

Exchange Online limits