cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thomas
Level 8

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

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
Level 8

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
Level 8

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

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow 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 Flow Community Video Gallery!

Users Online
Currently online: 55 members 4,481 guests
Please welcome our newest community members: