cancel
Showing results for 
Search instead for 
Did you mean: 

Send a summary email of Microsoft Team Channel conversations/posts to all members on a schedule

Step 1:

Create a Flow using the blank template and select "Recurrence" as the Trigger 

Capture.PNG

 

 

 

 

 

 

 

Step 2:

Define the schedule for the Flow trigger to send the summary email for MS Team conversations/posts.

In my scenario I have selected a weekly schedule for sending the summary email (every Monday at 8 am)

Capture1.PNG

Step 3:

Add the Get Messages (Preview) action from the Microsoft Teams connector and select the MS Team and Channel for retrieving the messages

 

Untitled.png

Step 4:

Filter the messages to only retrieve the latest messages (based on the Created Date of the message) .

Use the "Filter array" action to retrieve messages created in last 7 days (weekly).

This can be customized based on your schedule requirements.

Utilize the ticks function to compare dates  as shown in figure below

 

Untitled2.png

Filter array From - "Message List" from the "Get messages" action

Filter condition - "@greater(ticks(item()?['CreatedDateTime']), ticks(addDays(utcNow(), -7)))" checks if the message created date time is greater than 7 days from today

Step 5:

List all MS Team (Office 365 group) members using the "List group members" action from the "Office 365 Groups" connector.

Select the Office 365 group related to the Microsoft Team

 

Capture2.PNG

Step 6:

Create comma separated list of email addresses for each group member retrieved

Use Select action to retrieve only the Mail property from the list of group members

Then utilize the Join action to Join the mail addresses obtained from Select statement with ";" 

3.png

Step 7:

Create email message body from filtered array of MS Teams messages

Use Select action to fetch only the required attributes from the filtered array of Messages

Utilize the "Switch to text mode" to create your own email message summary from the "Body" output of the "Filter array" action of the Message list obtained

 

5.png

Map attribute : "Posted By <b> @{item()?['from']?['user']?['displayName']} </b>on @{formatDateTime(item()?['createdDateTime'],'MM-dd-yyyy')}</br></br>@{item()?['body']?['content']}"

 

The above mapped attribute renders the display name of the user creating the message along with the created date & time and the message body content

 

Create Join action to combine each message (utilize the Output from the previous select statement)

This creates a string of messages to be sent to the email body

Captur2222e.PNG

Step 8:

Send the email to the group members

Email to - Output from Join statement of group members list

Body - Output from Join statement of message body

3.png

Complete Flow looks like below

Capture.PNG

And the weekly summary email looks like the followingUntitled.pngThanks for reading!!

Meet Our Blog Authors
  • Working daily with Microsoft Cloud to deliver the needs of my company, my customers and various Microsoft communities and forums. | Office 365 | Flow | PowerShell | PowerApps | SharePoint |
  • Co-founder of https://plumsail.com, Office 365 and SharePoint expert. Passionate about design and development of easy to use, convenient and flexible products.
  • Microsoft Business Apps MVP. Owner of ThriveFast, an Office 365 consulting company.
  • 7x Microsoft Business Solutions MVP (CRM)
  • Solution Architect with Slalom, and organizer of the Boston Office 365 User Group, and long term SharePoint/Office 365 veteren. Find more at http://www.davidlozzi.com. Follow @DavidLozzi
  • I'm keen in MS technologies, SharePoint, Office 365 and development for them
  • Daniel is a Business Productivity Consultant & Microsoft Business Solutions MVP who is very enthusiastic about all things Office 365, Microsoft Flow, PowerApps, Azure & SharePoint (Online). Since the preview, Daniel has been working with Microsoft Flow and later on with Microsoft PowerApps. That led to him being awarded an MVP Award for Business Solutions. He loves to blog, present and evangelize about improving productivity in the modern workspace with these amazing tools!
  • Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.
  • I'm a Microsoft Office Servers and Services MVP with a special interest in SharePoint, Office 365, Microsoft Flow, Microsoft Teams and PowerApps. I work at Triad Group Plc ( https://triad.co.uk)
>