cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chegonichego
New Member

Iterate through excel and populate array with the same key

Hello!

 

For example, i get rows from excel file from OneDrive with "List rows present in a table" action:

 

employee email manager email
john@gmail.comlilly@gmail.com 
doe@gmail.comlilly@gmail.com 
chloe@gmail.comkevin@gmail.com

 

how to iterate through these rows to get array :

lilly@gmail.com : john@gmail.com; doe@gmail.com

kevin@gmail.comchloe@gmail.com

(manager email and list of his employees as String with ";" delimiter)

1 REPLY 1
ekarim2020
Super User
Super User

Here is an example flow that will get you started. It uses the following Excel file:

ekarim2020_1-1632916874509.png

and produces this output which can be used for sending emails messages or other uses:

2021-09-29_13-35-41.jpg

Here is the high-level flow:

ekarim2020_1-1632918824775.png

 

ekarim2020_2-1632916940485.png

We get the manager's email addresses from the Select action above, then we remove duplicates addresses:

2021-09-29_13-03-02.jpg

ekarim2020_4-1632917095607.png

This is the main body, where, for each manager, we get the employee email addresses:

2021-09-29_13-05-47.jpg

Close-up of the append to array variable:

ekarim2020_0-1632918671793.png

Current item above is dynamic content:

ekarim2020_3-1632919414150.png

Finally, we produce a dummy email body for each manager:

2021-09-29_13-20-26.jpg

Hope this helps.

Ellis

 

 


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

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,791)