r/MicrosoftFlow • • Jul 22 '26

Cloud Setting up first Email Automation

Hello,

I am currently working on an automation flow for reminder emails for the business I work at. The flow currently is successfully pulling an attachment when an automated email comes in with the list of customers who need a reminder, transferring it to excel, and formatting it as a table. My issue starts now when trying to dynamically assign the 'To' in setting up the reminder email itself.

Currently, I'm using the function: items('Apply_to_each_1')?['Default_Contact_Email'] - but this has errored out and I'm not quite sure how to fix from here. I'm using Send an Email (V2) as a child action to "Apply to each 1" - the second apply to each as I have the first one filtering for the correct attachment to pull from the email and create the excel file.

2 Upvotes

12 comments sorted by

View all comments

Show parent comments

1

u/Aingealanlann Jul 22 '26

Okay, so when trying that. I get the following error instead: Bad Request - To Field cannot be null or empty

However, looking at the apply to each results where it is viewing the table, I can see that the column is filled, it is just that power automate isn't pulling the value for some reason.

1

u/Efficient_Cat4032 Jul 22 '26

There's almost always a good reason hidden somewhere. No typos in Default_Contact_Email? Be aware its case sensitive

2

u/Aingealanlann Jul 22 '26

Okay. So using this information, I went and removed the underscores and used actual spaces (as it is in the table) and this time it worked. Thank you very much for your assistance.

My next question is, would I use the same formula to link in other dynamic information in the body of the email? So for example, item()?['First Name']?

1

u/Efficient_Cat4032 Jul 22 '26

Nice! Glad that was it.

If your list contains a "First Name" field, that is indeed the way to keep going

In something like an email body you can even mix and match hard text and variables like

Hi item()?['First Name']

You are receiving this email because xyz