Learn how to make the most out of the Dropbox Community here 💙. 

Forum Discussion

prjtprgn's avatar
prjtprgn
New member | Level 1
2 months ago

Need Help with Syncing Dropbox Folder Paths to Google Sheets via Apps Script

Hello everyone,

I'm working with a Dropbox team account and currently integrating Google Sheets with Dropbox using Google Apps Script. Here’s what I am aiming to achieve:

In my Google Sheet, each row represents a specific folder in our Dropbox account. Column C contains the shared link of the folder, and Column F is supposed to show the current path of the folder (path_display).

Challenge: When I fetch folder metadata using the Dropbox API through Apps Script, it doesn't include the path_display information. I need this data to ensure that the paths in Column F are updated whenever a folder is moved within Dropbox. This setup is critical because it feeds into an interactive map we are creating with Google My Maps, where the folder paths correspond to specific elements on the map.

Goal: Automatically update each folder’s path in Column F whenever there's a change in its location on Dropbox, to maintain accurate linkage in our Google My Maps project. Or more simply, run a function weekly that goes through every row and updates the column F with the most up-to-date folder path.

Has anyone else encountered this issue of missing path_display data when fetching metadata via the Dropbox API? Any guidance on how to ensure that folder paths are dynamically updated in Google Sheets would be greatly appreciated.

Thank you!

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Engineer rankDropbox Engineer

    prjtprgn

    I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of the unexpected output
    • prjtprgn's avatar
      prjtprgn
      New member | Level 1

      Hey, DB-Des, I'll reach out to you this afternoon with all the code, sorry for the late reply this is a side projet and unfortunately I don't have much time, Thanks for your help, I'll try to have something more precise for this afternoon.

  • scot c Brown's avatar
    scot c Brown
    New member | Level 1

    Hi there,

    Syncing Dropbox folder paths to Google Sheets using Apps Script can be done by integrating the Dropbox API with Google Apps Script. You’ll need to use Dropbox’s API to fetch folder paths and then update them in Google Sheets using Apps Script automation.

    A good starting point is checking if your Dropbox account allows API access and then setting up OAuth authentication to pull the folder structure dynamically. If you need a more customized solution for automating data sync between platforms, you might find this useful:

    https://ikonicdev.com/services/software-development/

    Hope this helps! Let me know if you need further guidance.

  • prjtprgn's avatar
    prjtprgn
    New member | Level 1

    Hi, 

    I found probably why I couln't access to the (path_display) of my folders using the Dropbox API.

    I'm in a Dropbox team account and need to click on the permission "files.team_metadata.read" on my Dropbox app, and I need the administrator of the account to do it. 

    Thanks for your help, I think that the issue was that.