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

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (71,983)