Skip to main content
Community site session details
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!

 

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

     

     

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!