web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Mapping Calendar Event Category(ies) Using a Variable

(0) ShareShare
ReportReport
Posted on by 271

I have a flow I built that takes input from a MS Form, and uses two variables to save an element of the submission to a specific folder in a document library. I.e. if the respondent said they live in a certain state, I have an Object variable that maps 'Alabama':'Southern Region', and so on...

 

MarcusD1_0-1670454403656.png

 

and the subsequent variable takes the specified state input from the form and assigns the correct region:

 

MarcusD1_1-1670454540032.png

 

variables('varRegions')?[outputs('Get_response_details')?['body/rf0c4529364ef42d18522441d560f9fad']]

 

 

And it works great. But now I'm trying to do something similar taking values from a Calendar Event, and using the first variable to map "Categories" (aka "tags") assigned to the event, and mapping those to a broader category group:

 

MarcusD1_2-1670454755482.png

 

and then use the subsequent variable to grab the actual category for a specific event for use later in the flow (specifically, adding that value to a column in a SharePoint list): 

MarcusD1_3-1670454850764.png

 

variables('varSubCategories')?[outputs('Get_calendar_view_of_events_(V3)')?['body/categories']]

 

 

But when I run the flow, I receive this error message:

Unable to process template language expressions in action 'Initialize_variable_Categories' inputs at line '0' and column '0': 'The template language expression 'variables('varSubCategories')?[outputs('Get_calendar_view_of_events_(V3)')?['body/categories']]' cannot be evaluated because property '' cannot be selected.

 

What am I doing wrong?

 

I have the same question (0)
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at
    Re: Mapping Calendar Event Category(ies) Using a Variable

    Hi @MarcusD1 ,

     

    First, the output of the Get calendar view of events (V3) action is an array named "Value", and categories are nested in "Value". So you can't call it directly with outputs().
    Second, the categories under "Value" may be arrays or strings. It will be an array when the category of your calendar event supports multiple selection.
    Finally, if you want to get the category of the calendar event, you need to use Apply to each action to get all the events in this time interval, and then if your calendar event has only one category, you can directly get it with:

    item()?['categories' ][0]

     

    vdezhilimsft_0-1670480593034.png

    vdezhilimsft_1-1670480626294.png

     

  • MarcusD1 Profile Picture
    271 on at
    Re: Mapping Calendar Event Category(ies) Using a Variable

    This was helpful and I was able to get my flow working the way I wanted. Thanks.

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 544 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 482 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 287

Last 30 days Overall leaderboard