cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
absint0o
Helper I
Helper I

Sync two folders in different Sharepoints

Hi there,

i have a folder (lets call this folder folder 1) (with subfolders) in one sharepoint that i want to sync to another folder (folder 2) in another sharepoint. I want to sync in both ways so if i add/edit/remove any file or subfolder in folder 1 it will be synced with folder 2 and if i add/edit/remove any file or subfolder on folder 2 it syncs with folder 1. This is possible? how can i do it? i'm new to flow... 🙂

thank you very much.

regards.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @absint0o ,

 

The Site address is selected according to your own actual situation, which is the Site address where the Library you specify is located.

84.PNG

 

Best Regards,

Community Support Team _ Barry
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

6 REPLIES 6
v-bacao-msft
Community Support
Community Support

Hi @absint0o ,

 

Please try the following method to configure Flow.

You may need to create ItemID field in each of the two libraries, the type is Number, which is used to record the ID of the file in the source list.

32.PNG

31.PNG

Besides, you need to configure the corresponding Flow for each source list.

 

Here is an example of synchronizing the files in Folder 1 to folder 2.

For example, I will synchronize the files in TestEtag to TestGroup and judge whether it needs to create new files or update files according to Created and Modified.

  • If it is a newly created file, copy the file into folder 2 and update the ItemID field.
  • If the file is updated, use Filter Query to filter out the corresponding file in folder 2 and update the file contents.

When a file is created or modified:

28.PNG29.PNG

When a file is deleted:

30.PNG

 

If you want to synchronize the files in folder 2 to folder 1, you only need to switch the Library Name in the two Flows. Hope it makes sense.

 

Best Regards,

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

WOW! @v-bacao-msft thanks alot for your help, what a great explanation! many thanks!!!

i have some questions:

in the first trigger i have to fill all this boxes like this:

Sem Título.png

but in the conditions i get this when searching for created or modified condition:Sem Título1.png

Also, i think i didn't undestand what do you mean with:


 

Besides, you need to configure the corresponding Flow for each source list.

 

sorry, i'm new to all this new world of flow.

Once again thank you for your help!

Regards,

João

 

So, i've managed to create all triggers and conditions you've showed in your reply but i'm a little confused with the site addresses. i don't know which address to put in each trigger and condition.

Can you show me what you have inside the get file content action?

Hi @absint0o ,

 

The Site address is selected according to your own actual situation, which is the Site address where the Library you specify is located.

84.PNG

 

Best Regards,

Community Support Team _ Barry
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

Thank you so much for posting the solution @v-bacao-msft ! 

I also have the same question and have tried the solution that you provided. But it's not working for me. When I add or modify a file in folder A(i.e. https://sharepoint123/test), it won't make a copy in folder B or reflect the change to the same file in folder B(i.e. https://sharepoint456/test). The same to the delete file flow as well, files won't be automatically deleted in Folder B when I delete them from Folder A. 

Can you please take a look at below and help me to understand how to fix it? Thanks so much!

Lily

 when a file is deletedwhen a file is deletedwhen a file is created or modifiedwhen a file is created or modified

yes, i also have the same problem, can't sync it no matter what i do, can anyone please help?

thank you so much for the help!!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,140)