Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Optimize repetitive flow

(0) ShareShare
ReportReport
Posted on by 20

Hello, 

 

1) I have a flow to export weekly all meetings from my team to an excel file. Their calendars are all shared with me and i'm using the action Get calendar view of event (v3) to access it. 

 

I have it structured like this: 

- Trigger

and then for each team member: 

- Get calendar view

- Apply to each

- Add a row into excel 

 

but for 50+ team members it seems like this flow could be optimized, any idea on how to do this? (see screenshot 1 below) 

 

2) I only want to export events that include at least 1 external attendee. I thought this could be done using the filters on the action "get calendar view" and saying there must be one attendees without the "@ourdomain.com" invited to the meeting but i have no idea how to do it. Any idea? 

(see screenshot 2 below) 

 

Thanks in advance ! 

 

 

  • creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on at
    Re: Optimize repetitive flow

    @matthieudumont The Get Calendars (V2) action returns the calendars you have access to. You need to then use the Filter Array action to filter out the calendars that you don't want to loop through. 

    creativeopinion_0-1714658301039.png

    As mentioned in my previous post, please reference this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong? to learn how you can filter OUT the calendars you don't want to loop through. You'll need to reference the third section in the tutorial where I show you how to filter your array by substring.

     

    The issue with your current logic in your flow is that you are getting each individual calendar, then getting the events for each calendar. This is inefficient especially if you have to do this 50+ times. Also, the way you currently have your flow set up, you are running the get events action, then looping through each event of the calendar then adding the row to the excel table. The way you have it set up, it needs to complete those actions for each calendar before moving onto the next calendar. Whenever you find yourself duplicating actions in a flow to suit specific requirements, it's always best to look at the logic and figure out a way where your flow doesn't require duplicate actions (when it's not necessary)

    creativeopinion_1-1714658392452.png

     

    My recommendation is suggesting the following (this is a rough draft of what the flow would look like):

     

    • Get Calendars (V2): Get Calendars you have access to
    • Filter Array: Filter Out Calendars you don't want to loop through
    • Apply to Each: Loop through Each Calendar
    • Get calendar view of events (V3): Get Events for the Calendar—filter out events with external attendees)
    • Add row to a table

    creativeopinion_0-1714658301039.png

    creativeopinion_2-1714658729385.png

    By doing it this way, you can use dynamic content in the Calendar ID field of the Get Calendar View of Events (V3) action rather than having to manually select each calendar 50 times and having to duplicate that action 50 times in your flow.

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • matthieudumont Profile Picture
    20 on at
    Re: Optimize repetitive flow

    And just to be sure, the output that i want is not the list of calendars i have access to. I want to see meeting names, attendees, ect... 

    Seems like the "Get calendars (V2)" is not really doing that. By looking at the dynamic value i see it only returns the ID of the calendars and some other parameters but nothing like the kind of output i used to get with the Get calendar (v3) which was allowing filtering on Attendees / organizer ect... 

     

     

  • creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on at
    Re: Optimize repetitive flow

    @matthieudumont The Get Calendars (V2) action doesn't require you to select any thing. It's an action that you can add to your flow which will return all the calendars you have access to (aka an array of Calendars).

    creativeopinion_0-1714572822246.png

     

    You will then need to filter this array to remove the calendars you don't want to include—please refer to this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?

     

    You'll want to reference the third part of this tutorial where I cover how to filter by substring. You want to adjust the Filter Array action so it filters OUT the calendars you don't want to loop through. Although it may look like the Filter Array action can only take a single condition—it can take multiple conditions. I cover how to add multiple conditions near the end of the video.

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

  • matthieudumont Profile Picture
    20 on at
    Re: Optimize repetitive flow

    Sorry i'm really beginning: 

    when you say: "You should use the Get Calendars action first to return the Calendars you have access to." 

     

    -> in the "Get calendar action" i can only select one calendar, how do i select 50+ calendars on 1 action "get calendar view" ? 

  • creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on at
    Re: Optimize repetitive flow

    @matthieudumont To run these actions 50+ times is definitely inefficient.

    creativeopinion_0-1714495788653.png

     

    You should use the Get Calendars action first to return the Calendars you have access to. Then use a Filter Array action to filter out the calendars that you don't want to loop through. I've linked a tutorial below on the Filter Array action. Although it may look like the Filter Array action can only take a single condition—it can take multiple conditions when using the Advanced Editing Mode.

     

    Refer to this section of a YT Tutorial I uploaded on how to get dynamic content from a Filter Array action

    creativeopinion_1-1714495827350.png

    To learn more about how to use the Filter Array action, please refer to this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?

     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.

    1️⃣ Cross-Referencing Data

    2️⃣ Filtering by Key

    3️⃣ Substring Matching

     

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

     

    IN THIS VIDEO:

     3 Ways to Use the Filter Array Action

    How to use the Scope Action to Group Actions

    How to Check the Number of Items returned from a Filter Array Action

    How to Cross-Reference Data in Excel with a SharePoint List

     How the Filter Array Action Works

     How to Access the Dynamic Content from a Filter Array Action

     How to Filter Items by a Key

    How to Filter Items by Matching a Substring

    How to Use Multiple Conditions in a Filter Array Action

    .... more to come. Let me know once you've successfully filtered out the calendars you don't want to loop through.

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

    ... lmk once you've successfully

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow