Send Email with from Dynamics 365/ Dataverse using Power Automate with Email Message & Activity Party
Dynamics 365 CE supports sending emails using server side synchronization. In this mechanism you can create an Email Message Record and Use a Bound Action to send the email message. Here No Outlook connector required to send email.
Follow the steps below how to create the Flow:
Step 1 – Create Trigger
Open Power Automate and create a new Automated Cloud Flow. The Business Scenario is, when a contact is created, an email should be sent to contact as welcome email.
Choose Table as Contact, Type as Added, Scope as Organization.
Step 2 – Add Action to Create Email Message Record
Add a new action step and connect Dataverse with Add a new Row action. In add a new row action and choose the table as Email Message. Add below parameters with values.
Description | Dear Customer, We are excited to welcome you to our company. Thanks & Regards, Team |
Due Date | Created On (Dynamic Content from Previous Step) |
Regarding (Contacts) | Contact ID (Dynamic Content from Previous Step) |
Subject | Welcome Email – New |
Activity Party (Add New Item) | Choose Activity Party Attribute Name – 1 as 2 Activity Party Partyid@odata Attribute Value – 1 as /contacts(<Contact ID >) |
The flow step look like below.
Activity Party 2 means Email To Address party. Below is a list of activity party values given for reference.
Activity party type | Value | Description |
---|---|---|
Sender | 1 | Specifies the sender. |
ToRecipient | 2 | Specifies the recipient in the To field. |
CCRecipient | 3 | Specifies the recipient in the Cc field. |
BccRecipient | 4 | Specifies the recipient in the Bcc field. |
RequiredAttendee | 5 | Specifies a required attendee. |
OptionalAttendee | 6 | Specifies an optional attendee. |
Organizer | 7 | Specifies the activity organizer. |
Regarding | 8 | Specifies the regarding item. |
Owner | 9 | Specifies the activity owner. |
Resource | 10 | Specifies a resource. |
Customer | 11 | Specifies a customer. |
ChatParticipant | 12 | Specifies a participant in a Teams chat. |
Related | 13 | Specifies one or more related records. |
Step 3 – Use Bound Action to Send Email
Add a new step with Dataverse Connector and use action Perform a Bound Action. In this step use table as Email Messages. Action as Send Email.
In Row ID select Dynamics content Email Message from previous step.
The Final Flow looks like below.
Now all Set. You can test.
Once you create a new contact you will see that the flow run successfully and an Email Activity created and sent in the system.
Hope this helps.