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

When a File is Created, Add Line Item

Hello,

 

We are trying to automate our AP archiving and approval process using Flow.

 

My idea is use the "When New File is Created, Add List Item" to a custom list on Sharepoint. 

 

We want to be able to drop the files (invoices in this case) into a Vendor's folder which will be inside an Accounts Payable folder. Can you set up this trigger to watch all the subfolders inside the AP folder and create list items?

 

I don't want to have to set up an individual Flow for every single folder for our 1,000+ vendors.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Dual Super User
Dual Super User

Re: When a File is Created, Add Line Item

@jackp514 

Let's see if I understood it. So, you have a parent folder "Accounts payable" with 1,000+ subfolders, one per vendor, right?

And, you tried to use the parent folder as input for the trigger, but adding a new file to a subfolder did not trigger your flow, right?

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Dual Super User
Dual Super User

Re: When a File is Created, Add Line Item

Hi again

Thanks for the feedback, I misunderstood you previous answer.

According to this post https://stackoverflow.com/questions/51928514/microsoft-flow-sharepoint-when-a-file-is-created-trigge... the Sharepoint Trigger "When a file is created" is executed also if file is created on subfolders. This post if from 2018, so not sure it is still working as you expected.

Please also note there are two triggers very similar on Sharepoint connector:

When a file is created in a folder

When a file is created (properties only)

 

The first one allows you to specify an input folder, the second trigger allows you to specify an input library (i.e. including its subfolders) or optionally to specify an input folder for that library.

 

Flow_folder.png

 

Hope this helps

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: When a File is Created, Add Line Item

@jackp514 

Let's see if I understood it. So, you have a parent folder "Accounts payable" with 1,000+ subfolders, one per vendor, right?

And, you tried to use the parent folder as input for the trigger, but adding a new file to a subfolder did not trigger your flow, right?

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

jackp514
Level: Powered On

Re: When a File is Created, Add Line Item

@GeirEfteland Yes I do not know exactly how to set up the flow so it triggers on subfolders as well. The only thing I see myself able to do is create a Flow for every Vendor Subfolder so that when new invoices are added, it always creates a line item.

Dual Super User
Dual Super User

Re: When a File is Created, Add Line Item

@jackp514 

So, if the flow triggers on subfolders as well, what's the problem then?

I mean, all new Files are created in their corresponding Vendor subfolder, right? Or they are created in the parent folder, and you need to move them to the right subfolder depending on any other input you receive (created by, file name, etc)?

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



jackp514
Level: Powered On

Re: When a File is Created, Add Line Item

@efialttes No I just want to know how I set the Trigger of the Flow to also watch all the subfolders inside the Parent Folder I'm creating.

 

DocuLibrary>Accounts Payable> Vendor#1

DocuLibrary>Accounts Payable> Vendor#2

 

I know I can create the Sharepoint Trigger: "When a File is Created, Create List Item" and make it watch the parent Folder (DocuLibrary>Accounts Payable) but how do I make it run if a new file is added to one of the vendor's subfolders.

 

The way I currently see it, is that I have to make a unique Flow for each Vendor's subfolder. Have a specific Flow set up to watch DocuLibrary>Accounts Payable>Vendor#1, then Copy and paste the Flow and change it to then watch DocuLibrary>Accounts Payable>Vendor#2. Rinse and repeat for every single unique Vendor folder we will make.

 

Please tell me I'm wrong here. I just want Flow to trigger on any subfolder change.

Dual Super User
Dual Super User

Re: When a File is Created, Add Line Item

Hi again

Thanks for the feedback, I misunderstood you previous answer.

According to this post https://stackoverflow.com/questions/51928514/microsoft-flow-sharepoint-when-a-file-is-created-trigge... the Sharepoint Trigger "When a file is created" is executed also if file is created on subfolders. This post if from 2018, so not sure it is still working as you expected.

Please also note there are two triggers very similar on Sharepoint connector:

When a file is created in a folder

When a file is created (properties only)

 

The first one allows you to specify an input folder, the second trigger allows you to specify an input library (i.e. including its subfolders) or optionally to specify an input folder for that library.

 

Flow_folder.png

 

Hope this helps

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,866)