cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KIBANG
Resolver I
Resolver I

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
Super User

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
Resolver I
Resolver I

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

 

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. ]

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,143)