cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rpskt
Helper I
Helper I

Power Automate Flow to send single email with respective rows related to user

Hi,

 

Requirement is to send single email to employee with his respective rows and CC to his respective Manager.

 

Data from sharepoint list

DOC_IDInvoice_NumEmployee EmailManager Email
AB12X12SUM11email22email
SD12Z1qwe212email33email
asdasasadsd11email22email
SD12Zw1qwe2w 11email22email

 

Expectation:

Employee 1:

DOC_IDInvoice_NumEmployee EmailManager Email
AB12X12SUM11email22email
asdasasadsd11email22email
SD12Zw1qwe2w 11email22email

 

 

 

Employee 2: 

 

DOC_IDInvoice_NumEmployee EmailManager Email
SD12Z1qwe212email33email

 

I have tried with initializing array and append to array but missing something.

 

Thanks in Advance.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @rpskt :

Please try this flow:

1\My Data Source is a Excel table

2.JPG

2\My flow

1.JPG

Reference Expression:
1\

union(body('Select'),body('Select'))
2\
items('Apply_to_each')['Employee']
3\
items('Apply_to_each')['Employee']
4\
body('Filter_array')[0]['Manager Email']
Best Regards,
Bof

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @rpskt :

Please try this flow:

1\My Data Source is a Excel table

2.JPG

2\My flow

1.JPG

Reference Expression:
1\

union(body('Select'),body('Select'))
2\
items('Apply_to_each')['Employee']
3\
items('Apply_to_each')['Employee']
4\
body('Filter_array')[0]['Manager Email']
Best Regards,
Bof

View solution in original post

Hi @v-bofeng-msft 

 

This looks like working when manager email in cc not added. 

The requirement is to CC manager email in the single to each employee.

Thanks in advance

v-bofeng-msft
Community Support
Community Support

Hi @rpskt :

Sorry, expression 4 should be placed under the CC parameter:

body('Filter_array')[0]['Manager Email']

1.JPG

Best Regards,

Bof

 

Hi @v-bofeng-msft 

Then, 4 emails are being received.

 

Just tried this and works.

rpskt_0-1609491924386.png

Is it possible to create HTML table customized with table lines?

Hi @rpskt :

Custom html table is possible.I recommend two methods:

Method1:Customize column in create html action

1.JPG

Method2:First use Select action to get the custom table you want, and then use create html action to automatically generate html table.

Best Regards,

Bof

Thanks @v-bofeng-msft 

Can we add the same row data per user as an attachment to the email. Please to help.

 

Thanks

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,950)