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

Creating a flow that counts the uploads made by each unique user

Hello! There's some fluff leading up to my actual question, which is highlighted in green.

The background

We have a Sharepoint library that absolutely must not exceed the 5000 file limit. Still, we occasionally have instances where users upload seemingly small folders that actually contain hundreds of files, which either break or fast approach the limit. 

 

The solution

I would like to create a flow that warns a user by email if they upload more than 50 files to this library in less than one hour.

 

The progress so far

I've made a Flow that triggers once every hour, and then goes into an If statement if 99 files or more were uploaded within that hour. I've made a For Each loop that looks at each upload and checks the Microsoft account who is the author.

 

What remains

Now, I want to see if one specific user is responsible for more than half (50) of those 99 files. This is where I'm stuck. Is it possible to create an abstract dictionary of some sort, which keeps track of the number of uploads by each unique user? If so, I know the steps ahead to send an email to that person.

 

I'd really appreciate the help! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Creating a flow that counts the uploads made by each unique user

Hi @ErikPrimozone ,

 

Yes, it could be achieved, the steps for your following flow:

1. get all the 99+ files, apply to each file, check the file creator and save the creator emails to an array variable, use the union function to make sure the emails in the array is unique with no same emails.

2. Apply to each of the emails Array, filter in the 99+ files for creator equal to the current item of the emails array, use length expression to get the number of files created by the email.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Creating a flow that counts the uploads made by each unique user

Hi @ErikPrimozone ,

 

Yes, it could be achieved, the steps for your following flow:

1. get all the 99+ files, apply to each file, check the file creator and save the creator emails to an array variable, use the union function to make sure the emails in the array is unique with no same emails.

2. Apply to each of the emails Array, filter in the 99+ files for creator equal to the current item of the emails array, use length expression to get the number of files created by the email.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

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

Top Solution Authors
Top Kudoed Authors
Users online (6,317)