cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jayant2
Helper V
Helper V

Create project list csv based on unique IT Lead and mail to IT Leaders

Hi All,

 

i am trying to build a flow which would help me achieve following requirements but i am not sure how it can be done.

I have a sharePoint list which has different projects with single selection People Picker as IT Lead. 
Now what i want to do is to collect all projects as per IT Lead and create an csv for it and mail it to IT Leaders. 

Not sure how it can be done, any help would be really appreciated. 

8 REPLIES 8
Paulie78
Super User III
Super User III

My approach would be:

  1. Get Items
  2. Use a select action to get the Person Value, ID and email into an array.
  3. Use a union on the generated array to get a unique list of people.
  4. Start an apply/each loop based on the new unique array.
    1. Within the apply each loop filter the get items array based on the value of the person within the loop
    2. Create CSV (Still inside the loop),
    3. Email the person the CSV.

Does that make sense?

Expiscornovus
Super User II
Super User II

Hi @Jayant2,

 

This can probably be done with a union function and a couple of other data operations actions like select and filter array. 

 

I have found an example Power Automate Community blog with such an approach:

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Get-Unique-Values-from-SharePoint-...

 

Hope this helps a bit and let us know if you need any additional help setting it up.

@Paulie78 it does make sense, but do you have a sample power automate workflow that i can look at so that i can get it more clearly? 

it would help alot!!

Paulie78
Super User III
Super User III

@Jayant2 funnily enough I just finished a video where I do exactly this. It's not the subject of the video, but I do the same operation you are trying to do. The video is unlisted at the moment, but you can find it here:

https://www.youtube.com/watch?v=pa45y6cQ4wE

@Paulie78 i was able to get the unique names in array. But when i use filter array it does provide me output.

My filter array does not work properly. it does not match with the email id and provide an output.

Jayant2_0-1614353172430.png

Jayant2_1-1614353259318.png

it does not match anything and provide an output. if it provides output then i can create an csv file but it does not provide output.

 

Paulie78
Super User III
Super User III

It looks right, stick two compose actions before the filter array. Put IT Lead Email in one, and 

items('Apply_to_each') in the other one, that will help you to troubleshoot if the values are different.

@Paulie78 i tried but no luck.
Using filter array, when I see the inputs for filter array, it shows the whole record is being sent as an input. I tried putting compose action and it is showing the correct email id. however, it does not match with IT Lead email.
Stuck here, not able to move forward. Please help!

@Paulie78 i tired using another people picker value also but it is not working. It gets the unqiue names in array but filtering array does not work. Not even sure why it is not working.

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

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (4,020)