web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Power Melange / How to send Email to a reci...

How to send Email to a recipient which is not stored in Dynamics365 via Power Automate?

PowerMelangeByShalinee Profile Picture PowerMelangeByShalinee 70

Business Scenario: In a lot of cases, we have a requirement where we have to send Email to a person who is not stored as a Contact,Account,User, etc in the system. They are called “unresolved recipients”.
So how to send to send them Emails?

Solution: Well, Dynamics365 offers a change in System Settings which makes it possible.
Step 1: Navigate to System Settings

Click on the gear icon and select Advanced Settings:

Change the area to Administration:

Select “System Settings”

Move to the “Email” tab and change “Allow messages with unresolved email recipients to be sent” to “Yes” >> OK

To know more about Email System Settings- go to this link:
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/system-settings-dialog-box-email-tab?view=op-9-1

Step 2: Now let’s start writing our flow.

The scenario which we have chosen is there is a custom field in Case Table known as “Requestor Email” and is filled with an Email ID which is not stored as any Contact/Account or User email but the customer wants the communication for this case to be sent in that Email Id only.

Here in the flow step of creating the email record, we will populate the email address as an Activity Party instead of referencing any table like contact or user. Though I’ll also show you how to set a party list by referencing a table also here.

Here is a snapshot of the entire flow.

Trigger: When an Email is created
Action 1: We are initializing an object variable which will store the Json.
Action 2: We are checking that whether the regarding of Email is of type Case.
Action 3: If yes, we are getting the linked case else we are Terminating
Action 4: Once we have the case, we are checking that whether the field Requestor Email is having any email id or not.
Action 5: If Yes, then we are setting the Party List variable as follows, else we are terminating it.

Since we cannot choose from a list of values like To, From, etc we will use “participationtypemask” value which will decide the attribute value. It is an integer and the main ones are as follows:

Activity party type Value
Sender 1
 ToRecipient 2
 CCRecipient 3
 BccRecipient 4

For other value of Activity Party Types, refer to https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/activityparty-entity?view=op-9-1

Further, the email address needs to be populated in “addressused” attribute.


Action 6: Finally we are updating the same Email record which was triggered and replacing the “To” i.e the recipient from the oob behaviour to our desired one.

To enter the JSON string as an Activity Party, click on “Switch to input entire array” at the right top corner of Activity Party section.

Then select the variable as the Activity Party.

Also please note once we are overriding the OOB behaviour, we also have to update the value of “From”. Over here, I’ll show you how to fill up a Party List in a different way.

Click on “+Add new item” and then select the attribute as shown below:

Then in the value section write, /entityname(<guid>) which you want to refer.

Save and Run the flow and then create an Email from the Case Timeline. We see that the flow has run successfully.

& there is an email created as follows:

You may see it in the Timeline too.

This is also useful when we have to send email to emailaddress2 or 3 and not the primary email.

Hope it helps!

& the Power Quote of the day is:

“The worst enemy to creativity is self-doubt.”
—The Unabridged Journals of Sylvia Plath by Sylvia Plath


This was originally posted here.

Comments

*This post is locked for comments