cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KIBANG
Helper II
Helper II

Problem with calendar event after sharepoint list is completed

Calendar invite flow.pngHi,

 

I have created a list in sharepoint for meeting requests. I created flows using power automate to automatically send an email to our group as well as the meeting organizer with a link to allow them to modify their meeting request if need be. That works fine. Where I am having trouble is with the calendar invite. I created a flow that is supposed to send an invite to the meeting organizer, to our group, and to the meeting attendees (there is a field (person, group - multiple entries allowed) to enter in their names in meeting request). I am using the dynamic content to put in meeting organizer and meeting attendee email addresses into the required attendees field, but when I do that, the flow switches and adds these "apply to each" brackets, which encases the calendar invite (screenshot below).

The flow does run successfully, but what is happening is that it is creating a separate invite for the organizer and each attendee, so four attendees equals four invites. I am not sure if the "apply to each" brackets are doing this, but it is driving me crazy! Another problem is that I see the invites in the calendar on my phone, but not in outlook. Please help! 

 
2 ACCEPTED SOLUTIONS

Accepted Solutions

Tom,

 

Thank you so much, again! I did another "apply to each' for the attendees. I'm not sure if this is what you meant. I have included a screenshot for reference.

Calendar invite flow appended.png

 

View solution in original post

Hello @KIBANG ,

move the second 'Apply to each 2' out of the 'Apply to each'. If you use 'Apply to each' inside 'Apply to each' then it'll repeat the inner apply to each for each loop in the first apply to each.

For example, your 'Organizer' column will contain: organizer_user1 and organizer_user2 and the 'Attendee' column will contain: attendee_user1, attendee_user2. Then the loops will go as below:

  1. 'Apply to each': organizer_user1, add user to variable
    1. 'Apply to each 2': attendee_user1, add user to variable
    2. 'Apply to each 2': attendee_user2, add user to variable 
  2. 'Apply to each': organizer_user2, add user to variable
    1. 'Apply to each 2': attendee_user1, add user to variable
    2. 'Apply to each 2': attendee_user2, add user to variable 

with 2 organizers and 2 attendees you'd end with a variable that contains 6 email addresses, 2x attendee_user1 and 2x attendee_user2.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

6 REPLIES 6
tom_riha
Super User II
Super User II

Hello @KIBANG ,

the 'Meeting organizer' and 'Meeting attendees' are probably people picker columns that allow selection of multiple people. As such, Power Automate prepares the flow for an array with multiple values in these columns: to process them one by one with the 'Apply to each' action. In the end, for 4 attendees it will loop 4 times = it'll send 4 emails.

To avoid this the 'Create event' action must be outside of the 'Apply to each' and the organizer/attendees must be in a string, not in an array.

I'd initialize a string variable, then inside the 'Apply to each' use 'Append to string variable' to store the email addresses for each of the meeting participants, and then, outside of the 'Apply to each', use that variable with the email addresses as required attendees instead of the SharePoint columns.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
KIBANG
Helper II
Helper II

Tom,

 

Thank you so much! I am a relative newbie, and this is my first foray into flows. The whole part about the string variables is something I could use more of a "step by step" with, if you would be so kind as to provide that (I will try to figure it out on my own, but just in case I am not able to).

I created the list and flow in SharePoint, and then sucked it into Teams. When I create the list in Teams, I am not getting the calendar invites. I verified that it is the same list from the same SharePoint Site. Any additional info you could give would be greatly appreciated.  

Hello @KIBANG ,

I added an example screenshot from similar flow, 'SendTo' is the people picker SharePoint column.

  1. Initialize the string variable
  2. Append to the string variable from step 1 the 'SendTo Email', in your case the 'Meeting Attendee Email'. 'Apply to each' will be added automatically. Don't forget the semicolon at the end.
  3. Repeat the step 2 also for the 'Meeting Organizer Email', append the emails into the same variable from step 1.
  4. Create event using the variable created in step 1 that will now contain emails from step 2 and 3. The event creation must be outside of 'Apply to each'.

image.png

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Tom,

 

Thank you so much, again! I did another "apply to each' for the attendees. I'm not sure if this is what you meant. I have included a screenshot for reference.

Calendar invite flow appended.png

 

View solution in original post

Hello @KIBANG ,

move the second 'Apply to each 2' out of the 'Apply to each'. If you use 'Apply to each' inside 'Apply to each' then it'll repeat the inner apply to each for each loop in the first apply to each.

For example, your 'Organizer' column will contain: organizer_user1 and organizer_user2 and the 'Attendee' column will contain: attendee_user1, attendee_user2. Then the loops will go as below:

  1. 'Apply to each': organizer_user1, add user to variable
    1. 'Apply to each 2': attendee_user1, add user to variable
    2. 'Apply to each 2': attendee_user2, add user to variable 
  2. 'Apply to each': organizer_user2, add user to variable
    1. 'Apply to each 2': attendee_user1, add user to variable
    2. 'Apply to each 2': attendee_user2, add user to variable 

with 2 organizers and 2 attendees you'd end with a variable that contains 6 email addresses, 2x attendee_user1 and 2x attendee_user2.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Tom,

 

Thank you, again. This is something that would have taken me so much longer (and many more gray hairs!) to figure out by myself. 

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (47,920)