Sai
Sai

Reputation: 55

Power Automate flow won't trigger for "Copy To" action for already existing files

I have a Power Automate flow with trigger condition - "When a file is created or modified in Sharepoint (properties only)".

The flow works fine when a file is created/modified in Sharepoint

But, there are files at Sharepoint which were uploaded before the Flow was set up.

Is there any way the already uploaded files can also be synced up?

I also tried with selecting a particular folder at Sharepoint and then copying it to same location but flow is not getting triggered for that even though a new folder is created.

Upvotes: 1

Views: 1465

Answers (1)

TJYen
TJYen

Reputation: 373

You create create a one time flow to go through all files within the folder and run your process. Then going forward, you can depend on the file modify trigger.

To process all existing files in a folder, create a instant flow with a manual trigger (as you will only run this once).

Next add a [Get Files - Properties only] and connect to the SharePoint folder where all the files exist. This will allow you to get all the file IDs within the folder to loop through.

enter image description here

Finally, add an [Apply to each] and pull in "value" from the above step. You can now copy your other steps into this loop and make changes to each file. Depending on what you are looking to do in each file, you may need dynamic file properties which can be done similarly in this video:https://www.youtube.com/watch?v=eDOwoPG9ua8&ab_channel=LernenTech

enter image description here

Upvotes: 0

Related Questions