cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vlr516
Helper I
Helper I

Adding Attendee Type to Outlook Template Flow Email

I'm using the template Email me with a list of upcoming Calendar events as my starting point to create an email with tomorrow's events. In the email, I would like to know if I am a "Required Attendee" or an "Optional Attendee". 

vlr516_0-1613161503226.png

 

I'm guessing I need to Initialize variable - AttendeeType as a string 

Then I would need to do something in the Apply to Each under getting my CallID events or Append to Array but I don't know what. 

 

Any help would be great. 

Thanks. 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

I was having trouble following the path as I believe you started with a different template (using the hotel and weather template) vs the one I was using so things weren't lining up. I've tried to take some of the concepts you mentioned and I've gotten myself to a point where I am pulling in the correct values, but my header for the email is changing the "AttendeeType" in the Iterate Through Each Event section to a different "AttendeeType" value than what was determined in the Apply to Each section early. Any ideas on what is causing this between the correct Compose function output and pulling in the wrong inputs in the Set Header?

 

1. I initialized the value: AttendeeType

 

image010.jpg

 

2. In the Apply to each section of Get Calendar View of Events (v2), I added a condition to set AttendeeType to either Required or Optional. 

 

thumbnail (1).jpeg

3. In the Apply to each section of Get Calendar View of Events (v2), I pulled in the AttendeeType value into my Append to array variable for CalendarObjects

image012.jpg

I can see this section working and pulling the correct values from my calendar. 

Appendtest.jpg

4. I composed my CalendarObjects

Compose.jpg

I can see the compose function works properly as the inputs and outputs still are correct.

composetest.jpg

 

5. In the Iterate Through Each Event of the Compose outputs, I set the header with my variable AttendeeType.

SetHeader.jpg

This is the point where the AttendeeType field goes awry. Despite the compose output being correct, the set Header input is incorrect and all the AttendeeType fields are converted to "Optional" with an "Optional" output.

Headertest.jpg

 

This ultimately makes my email incorrectly state that the AttendeeType is Optional vs Required.

Emailtest.jpg

 

 

View solution in original post

My issue has been solved:

 

In the Iterate Through Each Event section, on my Set Header, I should have used the each event's compose looped output vs the variable itself. 

 

Because I couldn't get down to the specific AttendeeType output in this function, I had to create a dynamic expression: items('Iterate_through_each_event')['AttendeeType']

 

image001 (1).jpg

 

Once I added that, my email is now displaying "Required" or "Optional" appropriately.

View solution in original post

7 REPLIES 7
annajhaveri
Community Champion
Community Champion

@vlr516 , please follow below steps:

1. Add Initialize variable action, provide "AttendeeType" as name of variable, select type as string

annajhaveri_1-1613487567401.png

 

2. In inside apply to each action, below the  "Compose Flight or Hotel" action, add new Set Variable action and select AttendeeType variable and configure below expression in the value parameter. Replace test@test.com with your email address.

if(contains(items('Apply_to_each')?['RequiredAttendees'],'test@test.com'),'Required',if(contains(items('Apply_to_each')?['OptionalAttendees'],'test@test.com'),'Optional',''))

annajhaveri_3-1613487695656.png

 

3. In the all of the "Set CalendarEvents variable" actions, add AttendeeType value as shown in below screenshot. Please note there are 3 "Set CalendarEvents variable" actions where to need to do this

annajhaveri_4-1613487822241.png

 

"AttendeeType": "@{variables('AttendeeType')}"

 

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Is there a way to do it without inserting my personal email, ie: to look at the user profile whose calendar it pulled?

annajhaveri
Community Champion
Community Champion

@vlr516 the calendar will be pulled according to the connection configured in the Get Calendar view action, you can check connection as shown in below screenshot.

annajhaveri_0-1613581946301.png

 

You can use Get My Profile and use Mail property from Dynamic content instead of putting your personal email . Again get my profile, will  get the profile of user who is configured in the connection.

annajhaveri_1-1613581999672.png

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

I was having trouble following the path as I believe you started with a different template (using the hotel and weather template) vs the one I was using so things weren't lining up. I've tried to take some of the concepts you mentioned and I've gotten myself to a point where I am pulling in the correct values, but my header for the email is changing the "AttendeeType" in the Iterate Through Each Event section to a different "AttendeeType" value than what was determined in the Apply to Each section early. Any ideas on what is causing this between the correct Compose function output and pulling in the wrong inputs in the Set Header?

 

1. I initialized the value: AttendeeType

 

image010.jpg

 

2. In the Apply to each section of Get Calendar View of Events (v2), I added a condition to set AttendeeType to either Required or Optional. 

 

thumbnail (1).jpeg

3. In the Apply to each section of Get Calendar View of Events (v2), I pulled in the AttendeeType value into my Append to array variable for CalendarObjects

image012.jpg

I can see this section working and pulling the correct values from my calendar. 

Appendtest.jpg

4. I composed my CalendarObjects

Compose.jpg

I can see the compose function works properly as the inputs and outputs still are correct.

composetest.jpg

 

5. In the Iterate Through Each Event of the Compose outputs, I set the header with my variable AttendeeType.

SetHeader.jpg

This is the point where the AttendeeType field goes awry. Despite the compose output being correct, the set Header input is incorrect and all the AttendeeType fields are converted to "Optional" with an "Optional" output.

Headertest.jpg

 

This ultimately makes my email incorrectly state that the AttendeeType is Optional vs Required.

Emailtest.jpg

 

 

annajhaveri
Community Champion
Community Champion

@vlr516  can you post full screenshot of your flow, for me to figure where the AttendeeType value is changing. Also are you assigning value to AttendeeType variable anywhere except the Yes and No branch of condition?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

My issue has been solved:

 

In the Iterate Through Each Event section, on my Set Header, I should have used the each event's compose looped output vs the variable itself. 

 

Because I couldn't get down to the specific AttendeeType output in this function, I had to create a dynamic expression: items('Iterate_through_each_event')['AttendeeType']

 

image001 (1).jpg

 

Once I added that, my email is now displaying "Required" or "Optional" appropriately.

Thank you for your help. I appreciate it. I figured out my issue and posted above. 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (2,663)