Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Help Needed: Get Events and Send an Email Issue

I want a flow that Gets Items (Phone Appointments) from the Outlook calendar and emails the customer a follow-up survey.


It works if there is one customer appointment at a time on the schedule. However, my problem is that if more than one customer is scheduled at the same time, multiple emails are sent, but all the individual emails are sent to the first customer email.


For example, if 3 individual customers are scheduled at 10am: Customer A, Customer B, and Customer C. My flow is emailing Customer A, Customer A, and Customer A.


What could be my issue?


Here is the calendar (for an example):



Here is the flow:







Here is my expanded Get Bookings (if needed):



If you need additional screenshots or information, just let me know!


Thank you in advance!! 



Advocate II
Advocate II

This is a shot in the dark for me as I'm still fairly novice with Power Automate, but I would guess it has something to do with the way your variables are being defined. Could you add a screenshot for how your customer email variable is defined?

Regular Visitor

Here are some screenshots of Customer Email expanded:





Here is the expression that is is pulling from the Outlook appointment:
trim(last(split(first(split(outputs('Html_to_text')?['body'],'Phone')),'Email: ')))

Ok, like I said novice here without a lot of experience with variables. So just throwing some ideas at the wall here:

First can you move your send an email inside your apply to each and test again?


If that doesn't work can you look at your run history, and go to the third item in your apply to each, then look at your customer email variable, what is the output there? Is it showing Customer C's email, I would think it must be showing Customer A's email since that is where is emailing to.

Lastly, I'm thinking it might make more sense to use compose instead of variables. So you would have something like:
Get booking>apply to each(>html to text>compose customer email>compose customer name>etc>get staff members>add to html table>send email)

Regular Visitor

I moved Send an Email inside Apply to Each.


Tested with two appointments at 7:30pm. Two emails were sent to the first customer appointment, none to the second customer. 😞

Ok, I set up a test on my end.

My flow actually runs twice (once for each appointment I set up)


Both appt 1 and appt 2 trigger a flow run, but my "Get events" step only pulls appt 2, thus customer 2 gets two emails (I believe this is due to an issue with query, but can't say for sure).


So, I just deleted the "get events" step and now both customers are getting emails (one off of each flow run).

Here is what I did (though mine is simplified for testing purposes)



Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (6,593)