cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Thomas Resolver I
Resolver I

Bidirectional Filesynchronization (OneDrive - DropBox)

Hi,

 

I´ve got a file on my OneDrive (4Business) and the same file on my DropBox.

If it´s getting modified from one of them, it should be copied/overwritten to the other. There is a Flow for each system.

 

As expected, this will lead into an infinite loop!

So I changend the modify to a delete -> create. But both Flow´s still process it as a modify.

 

Now I´m searching for a nice solution to only process changes, which were raised by a user (me) and not the other Flow!

Du to the fact, that I´m the owner of both Flows, the property "Modified by" will be my user in all cases.

 

Some Ideas are:

  • Deactivating the other Flow during the modification (doesn not work, because it´s not realtime)
  • Creating some kind of "Global Variable" (File?!?) which somehow works as ignore-gate
  • Submit special metadata (doesn´t work: Readonly)

Maybe you got some ideas how I could make that possible Smiley Very Happy

I´d be happy for any suggestion!

Thomas

3 REPLIES 3
Community Support
Community Support

Re: Bidirectional Filesynchronization (OneDrive - DropBox)

Hi @Thomas,

 

Could you share the details of your Flow configuration?

Perhaps you could consider storing the file in the specified folder after the change, using the current time as the file name, similar to the version.

Specify the folder of the trigger and set the Condition to execute the following action only if the folder where the file is located is not equal to the specified folder.

 

Best Regards,

Barry

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.
Thomas Resolver I
Resolver I

Re: Bidirectional Filesynchronization (OneDrive - DropBox)

Hello @v-bacao-msft

the Flow´s are quite easy. But since my testings in it, a little bit to large to post them as one image.

 

When a file is modified in Dropbox, I have to compare the Filename, due to existing Backup-Files in that folder.

This has to be done with toLower(), because Dropbox delivers everything lowered.

 

Afterwards I need to iterate all files on OneDrive, because it cannot be found by filename. I need the FileId:

Dropbox.jpg

That´s it from this side.

 

OneDrive is more straight foreward:

OneDrive.jpg

 

As I wrote, I tried a lot with metadata, but it does not seem to help.

 

I think the Idea of a "global variable" aka special file will be the only solution.

But I guess it is quiet a lot overhead and many conditions to do so. In both Flows.

 

If there are no other ideas, I´ll try this approach and come back with the results!

Thomas

Thomas Resolver I
Resolver I

Re: Bidirectional Filesynchronization (OneDrive - DropBox)

A small update on this:

 

Using another file to use it as a "global variable" is pure horror!

The Flow is getting more and more nested, because you have to doublecheck everything.

 

FileChanged:

Global-File Exitst?

  • Yes
    • ReadFile()
    • Last Update manually?
      • Last Update by DropBox?
        • SourceFile OneDrive?
          • Synch()
          • UpdateGlobalFile()
      • Last Update by OneDrive?
        • SourceFile DropBox?
          • Synch()
          • UpdateGlobalFile()
  •  - No
    • Synch()
    • UpdateGlobalFile()

And so on... What might looks easy, includes several steps to read and store. And synch & update the global file must be created 3 times, or source it out to another flow (Which does not make it easier to maintain).

 

I gave up on this and ended up with a simple, partially manual solution:

If OneDrive changes the file, it allways will be update to DropBox (most cases are in this direction).

If DropBox changes, I have to press a FlowButton, which updates the OneDrive file.

 

Off course I have to remind myself about pushing the button manually...

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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 (8,506)