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

Check if the flow is running

Hi,

 

I created a flow that is triggered when a new file is created in a SharePoint subfolder. This flow thencheck if there 5 files in the folder and then takes all the files and start an approval before sending tem to another location.

If I add 5 files one by one (and wait before each add), this is working as expected. However If I sync teh folder with OneDrive on my PC and copy the 5 files at once in that folder ; after the sync process is finished, I receive 5 approval with the 5 files !

Is there a way to check if the flow is already running and does not start it this is the case ?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @aheskia :

Even if you add 5 attachments at once, the trigger will still be triggered 5 times, so you will receive 5 emails.

My suggestion is to use scheduled flow:
For example, you can check the files in the folder for half an hour to get a list of files created within this half an hour. If the list is empty, no email will be sent. If the list is not empty, an approval email will be sent. This is equivalent to dividing the day into 48 cycles and checking the newly added files every half an hour.

Best Regards,

Bof

View solution in original post

3 REPLIES 3
abm
Super User
Super User

Hi @aheskia 

 

When you add 5 files one by one you mentioned it is working correctly. Are there any logic after the trigger whether the file count is 5 or not?  Can't it be applied for the same for OneDrive?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
v-bofeng-msft
Community Support
Community Support

Hi @aheskia :

Even if you add 5 attachments at once, the trigger will still be triggered 5 times, so you will receive 5 emails.

My suggestion is to use scheduled flow:
For example, you can check the files in the folder for half an hour to get a list of files created within this half an hour. If the list is empty, no email will be sent. If the list is not empty, an approval email will be sent. This is equivalent to dividing the day into 48 cycles and checking the newly added files every half an hour.

Best Regards,

Bof

View solution in original post

Hi @v-bofeng-msft 

 

Thanks for your answer. I'll go for a scheduling trigger...

 

Regards,

Antoine

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,298)