Skip to main content
Community site session details

Community site session details

Session Id : 472aqTShomUj2WJlHS7aXU
Power Automate - Building Flows
Answered

Attempting to retrieve calendar details and put them into an excel file

Like (1) ShareShare
ReportReport
Posted on 1 Sep 2023 13:51:40 by 9

Hi there,

 

Hopefully this is something simple and I am just being stupid, but I am trying to create a flow that reads all calendar events in a chosen calendar, and outputs their start time, end time and location into an excel file. So far I have managed to get the flow identify the calendar list, and I can see the results of the Get Calendar View Of Events (V3) when I look at it. I can see each event in a file showing all the key things I need.

 

 

Mike_Langlois_0-1693575855604.png

 

When I go to add it to a row in a table I have in excel, Automate automatically adds in a Apply to Each. When I go to change the value I want the apply to each to apply to (ID, so for each ID in the calendar view of events list) it adds another layer in? Is that normal?

Mike_Langlois_1-1693576156276.png

 

The add row into table is set up and seems fine, but the process fails overall with the error: 

 

The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@{outputs('Get_calendar_view_of_events_(V3)')?['body/value']}@{items('Apply_to_each')?['id']}' is of type 'String'. The result must be a valid array.

 

Bit new to all this, so have I done something stupid or does it not work how I would expect?

 

Many thanks!

 

  • trice602 Profile Picture
    14,108 Super User 2025 Season 2 on 01 Sep 2023 at 15:15:45
    Re: Attempting to retrieve calendar details and put them into an excel file

    Nice!  Always glad to help and hope to catchup on the next post!  

     

     

  • Mike_Langlois Profile Picture
    9 on 01 Sep 2023 at 15:14:12
    Re: Attempting to retrieve calendar details and put them into an excel file

    Hey thanks very much for the quick reply. That seemed to do it, must have just been getting myself mixed up. with too many layers. Its exactly what I needed, and with a bit of tweaking should meet my business need too 🙂

     

    Appreciate it!

  • Verified answer
    trice602 Profile Picture
    14,108 Super User 2025 Season 2 on 01 Sep 2023 at 14:10:44
    Re: Attempting to retrieve calendar details and put them into an excel file

    Hi @Mike_Langlois ,

     

    I hope this helps.  In my example, I don't see that Get Calendars (V2) is required, not sure where you are referencing that downstream.

     

    trice602_0-1693577302207.png

     

    When I add the action 'Add a row into a table' and then select Subject in the subject field, this action automatically wraps itself in an apply to each which is what you want.  I added a couple more columns to test.

     

    Here's what I would do:  attempt to copy my framework and see if this works for you.  

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete