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

Sending a table generated from Excel to multiple emails

Hello,

 

I'm having trouble building a flow for a project I'm preparing. The goal of this project is to send a daily email to multiple email addresses containing a table of order(s) (could be 1 or multiple) + the accompanying tracking number (order is being shipped). A table would be generated for each order linked to each email address. The table is sourced from Excel Online (see reference below). I'm having trouble figuring out how to create a custom email template, more or less, that will display in table format the Order # or #'s with accompanying tracking # for each unique email address.

 

Jstrom_0-1612410877767.png

 

Example output to email for "test1@outlook.com" address:

(doesn't have to be in this format necessarily)

 

Jstrom_1-1612410916896.png

 

Is this possible in Power Automate? Additionally can this be managed for 100 rows for example?

 

Please let me know if you have any clarification questions.

 

Thank you in advance for the assistance.

 

Best Regards,

 

Julian

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jstrom
Frequent Visitor

@J_Porter I was actually able to figure this out by piecing together many other solutions. 

 

  1. List Rows present in table --> pulling in table
  2. Initialize Variable --> set a variable called 'Email' to store all the values from "Email Address" column
  3. Append all values from "Email Address" column to variable 'Email'
  4. Compose Action --> use union() function on 'Email' variable
  5. Set Variable --> Set 'Email' to outputs of compose
  6. Apply to Each
    1. Set 'Select an ouput from previous steps' to 'Email' variable
    2. Filter Array --> From 'Value', then check if 'Current item' is equal to 'Email Address'
    3. Select Action --> From 'Body' of Filter Array, then include in 'Map' what you want to show.
    4. Create HTML Table --> From 'Output' of Select
    5. Send an Email --> send To = first(variables('Email')), Body = 'Outputs' from HTML table.
    6. Compose Action --> skip(variables('Email'), 1) to skip to next email in array
    7. Set Variable --> set variable 'Email' to 'Outputs' from Compose Action.

There's so more details in between but that's more or less how it works. The main breakthrough was the Select Action, to allow the HTML table to made.

 

Thanks for taking the time to look into this.

View solution in original post

7 REPLIES 7
J_Porter
Helper I
Helper I

Just for clarification.
You would like test1@outlook.com to receive the rows it is included in?
And the same for the other addresses?

Jstrom
Frequent Visitor

Yes exactly. 

Jstrom
Frequent Visitor

bumping

Jstrom
Frequent Visitor

@J_Porter any ideas? Would appreciate any help or direction you could provide!

J_Porter
Helper I
Helper I

@Jstrom 
Sorry for the delay.

I'm attempting to create a flow that can perform the function needed.
I've been trying with different triggers and actions to get this working.
So far I've identified that it could be possible to select the rows using the email address and have them all sent.
However it would repeat until performed again for each email.
A method I'm currently working on is developing a system that copies the rows for each email address value, then repeats until all values have been copied then the emails stop.
I'm a bit green to this level of automation with schedules and excel actions but I think I can develop and share the template.

If anyone else can find a better solution please feel free to make a suggestion.

Jstrom
Frequent Visitor

@J_Porter I was actually able to figure this out by piecing together many other solutions. 

 

  1. List Rows present in table --> pulling in table
  2. Initialize Variable --> set a variable called 'Email' to store all the values from "Email Address" column
  3. Append all values from "Email Address" column to variable 'Email'
  4. Compose Action --> use union() function on 'Email' variable
  5. Set Variable --> Set 'Email' to outputs of compose
  6. Apply to Each
    1. Set 'Select an ouput from previous steps' to 'Email' variable
    2. Filter Array --> From 'Value', then check if 'Current item' is equal to 'Email Address'
    3. Select Action --> From 'Body' of Filter Array, then include in 'Map' what you want to show.
    4. Create HTML Table --> From 'Output' of Select
    5. Send an Email --> send To = first(variables('Email')), Body = 'Outputs' from HTML table.
    6. Compose Action --> skip(variables('Email'), 1) to skip to next email in array
    7. Set Variable --> set variable 'Email' to 'Outputs' from Compose Action.

There's so more details in between but that's more or less how it works. The main breakthrough was the Select Action, to allow the HTML table to made.

 

Thanks for taking the time to look into this.

I'm glad you got this together. I had almost the same flow on schedule trigger, only difference was that I didn't have the create HTML table. So I had issues with the sending of the information.

Thanks, your resolution helped me as well.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,621)