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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,714)