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!!
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?
Here are some screenshots of Customer Email expanded:
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)
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)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!