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

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
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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,462)