cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Sending Scheduled Emails with Excel Rows Included

I am new to Microsoft Flow/Power Automate and I am trying to work on a project with it. I have been experimenting with it but I am still getting issues.

 

My goal is to send emails to specific people in my company at the end of the day or week ever day or week.

 

The email needs to contain the data from rows in an excel sheet.

 

There are new rows added daily and the email should only send the most recent rows.

There is a data field in the excel data but idk if that could be used to determine which rows to send?

 

I would also like to send all the rows related to one person under a single email.

Right now when I send it every row comes in as a separate email, which I could see being very irritating for people.

 

Here is my current flow:

Flow1.JPG Flow2.JPG

 

What is wrong with my Flow?

How do I get it to do what I want?

 

Please Help!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

 

Hi @littlek ,

 

As @edgonzales  suggested, please try the following configuration:

Spoiler
56.PNG57.PNG58.PNG59.PNG

And you could add more rows in Condition control to filter rows.

Feel free to let us know if you have any other questions.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Highlighted
Super User II
Super User II

@littlek 

Hi there.  So, what your flow is doing is going once a week to that spreadsheet and getting all of the rows (let's pretend you have 10 rows).  One of the columns of that spreadsheet is "Customer eMail", so when you drop that in the "To" field, flow presumes they'll all be different and automatically creates an "Apply to each" loop for you (note the gray box).

 

So, what it's doing is moving through all of the rows, one at a time, and 'doing the thing'...in this case, sending an email with all of that information in the body.

 

The way around this is to stage everything ahead of time by using a Select action and/or a Create HTML table.  But there's still the question of the email address...your question said you want to send it to certain people at work but the flow shows 'Customer eMail'.  Are we sending the eMail to the same people each week?  

 

It's possible to grab the list, figure out all of the 'people', and then cycle through the list to only grab their relevant rows, and shoot off an email.  It's probably an intermediate thing, but we can do it.  We would definitely want to know which rows to send (based off a "Status" field or something, right?).

 

Let me know what you think and we can get started.

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Highlighted

The Customer Email thing in the "To" field is more of a placeholder.

That column has the email address of all the customers.

In my case I was thinking we could make another column that has the email address of the person in the company that email would need to go to (call it Account Manager email) so that it would read the "To" field and only send the relevant emails for that person to them.

I'm not even sure if that would work though?

 

It's possible to grab the list, figure out all of the 'people', and then cycle through the list to only grab their relevant rows, and shoot off an email.  It's probably an intermediate thing, but we can do it.  We would definitely want to know which rows to send (based off a "Status" field or something, right?).

This is definitely what I want to do though.

If possible I would want to decide which rows to send based off the "Date Field" (so it will only send the last weeks worth of rows every week).

 

Thank You

Highlighted

@littlek 

Ok, lots to do.  The article below isn't doing exactly the same thing, but it uses some of the concepts you want (Grouping a list by a column where the data is moderately dynamic).  It might seem a bit much, at first, but read through that and see if that makes sense.  You won't be doing the part where we're adding numbers and variables; instead, you'll add the row to an array and then turn it into an HTML table to send via email at the end.

 

Group By and Sum in Power Automate / Flow

 

Keep at it.

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

 

Highlighted

 

Hi @littlek ,

 

As @edgonzales  suggested, please try the following configuration:

Spoiler
56.PNG57.PNG58.PNG59.PNG

And you could add more rows in Condition control to filter rows.

Feel free to let us know if you have any other questions.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted

@v-bacao-msft That makes sense.

 

Though I am having an issue where it just sends an empty email.

It seems it is reading the condition as false no matter what.

 

And when I move the "Append to array variable 2" to the "No" it just sends an email with every row in it.

I need it to only send the past 7 days worth of rows (every row has a date field).

 

It also is not not sending rows based on email.

Whatever email address is in the email field is the only address I want that particular row to send to.

 

How do I accomplish this?

 

It also tends to freeze/time out.

Highlighted

 

Hi @littlek ,

 

According to the configuration method provided by me, there will be at least one record in each table.

Please carefully check my configuration and pay attention to the selection of Dynamic content.

 

In addition, I have mentioned in the previous reply, if you want to filter records based on date, you can add rows to Condition to filter records.

 

If the date field type is Date, then you also need to use the expression to restore number to Date for comparison, please refer to the following thread:

https://powerusers.microsoft.com/t5/Building-Flows/Excel-file-to-list-flow-date-issue/m-p/279258#M28...

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Ok thank you.

I see now.

Highlighted

hi, I forgot to set the variable to union/find unique approver.

All sorted now.

 

Thanks you for your help @v-bacao-msft , @edgonzales ,@JohnAageAnderse 

 

@JohnAageAnderse  ( I will try your approach for next project)

 

AC_Flow_0-1595828455565.png

 

Highlighted

Hi @v-bacao-msft 

 

Thanks for posting this solution - would you know how to add a CC in to this flow? I have both email and CC in my table and need to include the CC as well.

 

Thank you!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (12,910)