cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fzer0
Helper I
Helper I

Flow to send emails with list of own calendar events

Hi All,

 

I would like to create a flow which sends once a week an email with list of all calendar events to each user.

It is a little bit similar to this topic - https://powerusers.microsoft.com/t5/General-Flow-Discussion/microsoft-flow-get-all-items-with-distin...

 

However, when there are multiple attendees in event, RequiredAttendees has values separated by ";" not comma. How to extract them to an array?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @fzer0 ,

 

You can use a similar method to achieve your needs.

Use Get events(V2) action to get all the events, append the included RequiredAttendees to the variable, and then use union() function to remove the duplicate email address.

Traversing these RequiredAttendees, the role of Condition 3 is to exclude array elements with null values.

Traverse the value of Get events action again, append the information of the current RequiredAttendees related event to the HTML Table, and finally configure the Email action.

 

Image reference:

29.PNG30.PNG31.PNG32.PNG

 

Take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-bacao-msft
Community Support
Community Support

Hi @fzer0 ,

 

Could you share a screenshot of your Flow configuration?

If can, would you use screenshots to illustrate your needs?

It seems that your list is an Event list rather than a Task list mentioned by Thread.

 

I assume that you want to integrate all the events into a Html table and send it to all attendees as email body. And Attendee name needs to be separated by commas.

If this is the case, please refer to the following method to configure Flow.

  • Configure Get items action to get all the events in Event list, initialize three array variables, the names are AttendeesName, HtmlTable, Email.
  • Iterate through all the items and append AttendeesName and email contained in the current item to the corresponding variables.20.PNG
  • Use Join action to change the interval symbol in AttendeesName array to a comma, then append Dynamic content corresponding to the field to be displayed in HTML Table to HtmlTable variable, and finally clear AttendeesName.21.PNG
  • Use union() function to remove the duplicate email address, replace the symbol with Join action, and finally configure Send email action.

22.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft ,

 

Sorry for late response but I was quite busy with different projects. Thanks for your solultion, it's clear for me.

What I want to achieve is to send each attendee a table with the events that are assigned to them.

So each attendee will receive email with table which will contain only the tasks from shared calendar where he is participating.

Any way to modify your solution to be able to cover this issue?

Hi @fzer0 ,

 

Since you need to send each individual user the event they are participating in, it seems that it don't need to display the attendee name.

I assume that Attendee field you mentioned allows for multiple selections. You could configure Flow as follows:

 

  • Use Get items action to get the emails of all attendees and append them to the array variable.13.PNG

 

  • Use union() function to remove duplicate emails and then iterate through the results.
  • Traverse all the items again, and determine if the attendee email in the item is equal to the email that is currently traversed.
  • If so, append the relevant item information to HtmlTable variable.15.PNG

 

  • The remaining steps are similar to the previous post.14.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft ,

 

I'm still struggling with this flow. What is different is that you are using the sharepoint "Get items" and for Outlook calendar I have to use "Get calendar view of events". Therfore,  I cannot do "Apply to each" => values, and then inside it the second "Apply to each" = > Attendees 

 

2019-04-15 15_16_43-Edit your flow _ Microsoft Flow.png

Hi @fzer0 ,

 

You can use a similar method to achieve your needs.

Use Get events(V2) action to get all the events, append the included RequiredAttendees to the variable, and then use union() function to remove the duplicate email address.

Traversing these RequiredAttendees, the role of Condition 3 is to exclude array elements with null values.

Traverse the value of Get events action again, append the information of the current RequiredAttendees related event to the HTML Table, and finally configure the Email action.

 

Image reference:

29.PNG30.PNG31.PNG32.PNG

 

Take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @fzer0 ,

 

Edit:

 

It seems that there are some problems, please add a Set variable action below Send an email action to empty the array.

Image reference:

25.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @fzer0 ,

 

Is the method I provide valid? look forward to your reply.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,085)