Send an Email to all users in a D365 Team using power automate. - CloudFronts

Send an Email to all users in a D365 Team using power automate.

D365 gives us a functionality to assign a record to a group of users which can be archived by using a D365 Team these users then are know as members of that respective team, due to functionality restrictions we cannot send an email to a  D365 team, however there are a few workarounds by which we can achieve this functionality.

Lets consider a case.

Suppose we have a D365 team called as “Accounts Associates” we have added a set of users in this team. Now if an invoice milestone is in the ready state i.e. “Ready For Invoicing” we need to send a reminder email to this “Accounts Associates” team to take an action regarding the ready invoicing.

Solution :-

The following case can be achieved by using an Out of the box functionality i.e. By using a distribution list

Note :- (we must have an Microsoft Exchange License).

Lets Begin with the implementation.

Step – 1 Creating a Distribution List

Login to your admin center (Link –https://admin.microsoft.com/)

Microsoft 365 admin center 
Resources 
Billing 
Q Support 
Settings 
Setup 
Reports 
Health 
Admin centers 
Security 
Compliance 
$6 
Azure Active Directo... 
Exchange 
SharePoint 
Teams 
All admin centers

In the Admin center  Section of the  Left navigation bar select “Exchange”.

Admin 
Exchange admin center 
dashboard 
recipients 
permissions 
compliance management 
organization 
protection 
mail flow 
mobile 
public folders 
unified messaging 
hybrid 
New Exchange admin center 
Welcome 
recipients 
mailboxes 
groups 
resources 
contacts 
red 
migration 
organization 
sharing 
add-ins 
mobile 
mobile device access 
permissions 
admn roles 
user roles 
Outlook Web App policies 
protection 
malware filter 
connection filter 
spam filter 
outbound spam 
quarantine 
action center 
dkim 
public folders 
public folders 
Try the new Exchange admin center 
compliance management 
in-place eDiscovery & hold 
auditing 
data loss prevention 
retention policies 
retention tags 
journal rules 
mail flow 
rules 
message trace 
accepted domains 
remote domains 
connectors 
unified messaging 
UM dial plans

Under the “recipients” select “groups”.

In the “+ New Microsoft 365 Group” pull down the dropdown and add the distribution list.

Add the Display name and the “Alias” and save the Distribution list.

Add same users which are present in the teams to this Distribution list.

Step – 2 Creating a Queue in D365

Go to “Settings” -> “Service Management” ->” Queues” and click on “+NEW” -> give it a name -> “Save” 

A mailbox would be created with the same name that of the queue.  

Open the mailbox. The Email address field will be blank, add the Distribution List’s email address created in Step 1.   

Step -3 Create a New Team or select an Existing Team. In the Default Queue lookup, select the Queue created in Step 2.

Step – 4 Create a Flow which triggers on update of a project contract line milestone i.e. When status is ready for invoicing

  1. Flow triggers when Project Contract Line is Updated, Condition Invoice Milestone is Ready for invoicing for which click on the “…” select settings and add the following condition in the trigger sectio
  2. Get the Teams ID in this case I have hardcoded the ID as no record was associated with it to retrieve it
  3. Get the Teams Details.
  1. Get the Default Queue to which the email will be triggered .
  2. Send an Email to the Incoming Email of that Queue which is Email ID set on the Distribution list.
  3. Note : (We will have to Manually add or remove the users from both the Distribution list and the Teams. i.e.

both the team and the distribution list must be sync,

  1. if a member is added or removed from the team the same should be done in the distribution list )
  2. Output .

Hope this helps.!


Share Story :

Secured By miniOrange