cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fzer0
Level: Powered On

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
Community Support Team
Community Support Team

Re: Flow to send emails with list of own calendar events

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
Community Support Team
Community Support Team

Re: Flow to send emails with list of own calendar events

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.
fzer0
Level: Powered On

Re: Flow to send emails with list of own calendar events

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?

Community Support Team
Community Support Team

Re: Flow to send emails with list of own calendar events

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.
fzer0
Level: Powered On

Re: Flow to send emails with list of own calendar events

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

Community Support Team
Community Support Team

Re: Flow to send emails with list of own calendar events

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

Community Support Team
Community Support Team

Re: Flow to send emails with list of own calendar events

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.
Community Support Team
Community Support Team

Re: Flow to send emails with list of own calendar events

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,479)