cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
willy30870
Level: Powered On

my flow works but no as I want it with onedrive

Hello,

 

This is my flow based on trigger "when a file is created" :

To resume : 

1 - when a new file is created 

2 - I get the name of the folder where the file is created

3 - I select all the row in my google sheets that have the same folder's name 

4 - I get the emails in relation between the folder and my google sheet 

5 - I waiting 10 min (it's to waiting if more files is upload in the same folder)

6 - I get the last files in this folder

7 - I create a html table with the name of each files

8 - I send an email with the email list retrieved in step 4 and with the new files added in my html table.

 

This flow works almost as I want it. But when I add multiple file in the 10 min delay (for example 3 files), I receive 3 time the same email.  

 

would you have an idea to solve my problem ?

 

best regards

allmyflow.JPG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jwhite
Level 8

Re: my flow works but no as I want it with onedrive

Hi @willy30870,

as RezaDorrani mentioned as the trigger for your flow is a file being created it will run every time you create a file.

The only solution that I can think of (although there is likely better out there) is to have a table or a list that tracks whether or not your flow is running.

I set up a flow using an excel table, but the same could be done with a sharepoint list or practically any other data storage.

The table is as simple as below:

FlowRunningTable.png

The "Running" column is just to check if our flow is running, and the "Key" column to identify it later in the flow.

Then before your steps in the flow I get the value of the running column and a condition for if the value of the running column is "No":

FlowRunningCondition.png

Then we leave the  If no branch of the flow empty as we don't want to do anything if it is. If it isn't running, we first set the "Running" column to "Yes", then have all the other steps of your flow:

FlowRunningRun.png

Finally at the end of this "If yes" branch we set the value of the "Running" column back to No:

FlowRunningReset.png

 

Which will then allow the If yes column to activate on the next flow run. Let me know if this helps!

 

Full flow and sharepoint equivalent in spoiler:

Spoiler
Full Excel Flow:
FlowRunningFullFlow.png
Sharepoint list:
FlowRunningSharepointList.png
Sharepoint Flow:
FlowRunningSP.png

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: my flow works but no as I want it with onedrive

Hi @willy30870 

 

Looks like you are triggering your flow when an item is created

Hence when you add more files, the flow gets triggered again

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

jwhite
Level 8

Re: my flow works but no as I want it with onedrive

Hi @willy30870,

as RezaDorrani mentioned as the trigger for your flow is a file being created it will run every time you create a file.

The only solution that I can think of (although there is likely better out there) is to have a table or a list that tracks whether or not your flow is running.

I set up a flow using an excel table, but the same could be done with a sharepoint list or practically any other data storage.

The table is as simple as below:

FlowRunningTable.png

The "Running" column is just to check if our flow is running, and the "Key" column to identify it later in the flow.

Then before your steps in the flow I get the value of the running column and a condition for if the value of the running column is "No":

FlowRunningCondition.png

Then we leave the  If no branch of the flow empty as we don't want to do anything if it is. If it isn't running, we first set the "Running" column to "Yes", then have all the other steps of your flow:

FlowRunningRun.png

Finally at the end of this "If yes" branch we set the value of the "Running" column back to No:

FlowRunningReset.png

 

Which will then allow the If yes column to activate on the next flow run. Let me know if this helps!

 

Full flow and sharepoint equivalent in spoiler:

Spoiler
Full Excel Flow:
FlowRunningFullFlow.png
Sharepoint list:
FlowRunningSharepointList.png
Sharepoint Flow:
FlowRunningSP.png

View solution in original post

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (4,757)