Skip to main content
Dropbox Personal Logo

Dropbox Personal

Sync files and folders from individual accounts

✅ Ready📚 Documentation Available

Overview

The Dropbox Personal connector allows you to sync files and folders from a single, individual Dropbox account. Unlike the Team connector, this focuses on your personal “Home” drive and does not import organization-wide team structures or groups.

Configuration Guide

User Client

This connector uses the Dropbox User Client. It is designed to interact with a specific user’s account data. It treats the root of your Dropbox as the “Record Group” (Drive) and syncs content recursively from there.

APIs Documentation

Concept of Cursor

A cursor is a short string that acts like a bookmark for keeping track of changes in a folder.
  1. When you first list the contents of a folder, the API response includes a cursor.
  2. This cursor represents the exact state of that folder at that moment.
  3. Instead of re-downloading the entire list of files to check for changes, the connector passes that cursor to the /files/list_folder/continue endpoint.
  4. The API then returns only the files and folders that have been added, modified, or deleted since the last sync.
This makes syncing highly efficient as you only process the differences.
This guide will walk you through creating a Dropbox application to connect your personal account to PipesHub.

Step 1: Create a Dropbox App

  1. Navigate to the Dropbox App Console and sign in with your Dropbox credentials.
  2. Click the Create app button on the top right.
Dropbox Create App
  1. Configure your new app with the following settings:
    • Choose an API: Select Scoped access.
    • Type of access: Select Full Dropbox. (This allows access to all files in your account, not just a specific app folder).
    • Name your app: Enter a unique name, for example, “Pipeshub Personal Connector”.
  2. Click Create app. You will be redirected to your new app’s settings page.

Step 2: Configure Permissions

  1. On your app’s page, navigate to the Permissions tab.
Dropbox Permissions
  1. You must enable the following Individual Scopes by checking their boxes to allow PipesHub to access your data:
    • account_info.read (Required to identify your user ID and email)
    • files.content.read (Required to download file content)
    • files.metadata.read (Required to track file names, types, and updates)
    • sharing.read (Required to detect shared link permissions)
    • sharing.write (Required to create preview links)
    Note: You do not need to check any “Team Scopes” as this connector is for individual accounts only.
  2. Click Submit at the bottom of the page to save these changes.

Step 3: Configure Redirect URI

  1. Go to the Settings tab and find the OAuth 2 section.
  2. Add the following URL to the Redirect URIs field (replace {your_pipeshub_base_url} with your actual domain):
http://{your_pipeshub_base_url}/connectors/oauth/callback/Dropbox%20Personal
Important: Ensure the URL matches exactly what is configured in your connector code (specifically the Dropbox%20Personal suffix).
  1. Click Add to save the URI.
Dropbox Redirect URI

Step 4: Copy App Key and Secret

  1. While in the Settings tab, locate the App key and App secret.
  2. Click Show to reveal the secret.
  3. Copy these credentials for the next step.

Step 1: Configure Connection

  1. Open your PipesHub application and navigate to Connections Settings.
  2. Select Dropbox Personal.
  3. Paste your App key into the “Client ID” field.
  4. Paste your App secret into the “Client Secret” field.
Configure Credentials

Step 2: Set Sync Strategy

Click Next. You can set up your sync strategy: Manual or Scheduled.
  • Batch Size: Defines how many files are processed in one database transaction (default: 100).
  • Schedule: Set the interval (e.g., every 60 minutes) for the connector to check for changes.
Sync Strategy

Step 3: Authenticate

  1. Click Save Configuration.
  2. Click the Authenticate button. You will be redirected to Dropbox to approve access.
  3. Once authorized, the connector will immediately begin the first full sync.

Connector Workflow

How Does Dropbox Personal Connector Work?

The DropboxIndividualConnector inherits from BaseConnector but is simplified for single-user contexts. It implements the standard lifecycle methods:
  • init
  • _get_current_user_info
  • run_sync
  • _run_sync_with_cursor
  • _process_dropbox_items_generator

Connector Initialization

The workflow is straightforward compared to the Teams version. run_sync - Syncs 3 main elements:
  1. User Identity (The account owner)
  2. Record Group (The “Personal Drive”)
  3. Files and Folders (Recursive sync)
The system uses an Incremental component which saves a ‘cursor’ in the database.
  • Full Sync: If no cursor is initialized, it runs a full sync.
  • Incremental Sync: If a cursor exists, it only fetches the delta (changes).

User & Record Group Sync Workflow

Unlike the Team connector which iterates through member directories, this connector focuses on the authenticated user.

Identity Resolution

The sync begins by calling users/get_current_account. This verifies the token and retrieves the account_id and email of the owner.

Drive Creation

Once the user is identified, the system ensures a “Record Group” exists:
  • Name: “Dropbox - {User Email}
  • Type: Drive
  • Permission: The user is assigned as the OWNER.

Files and Folders Sync Workflow

Workflow Overview

  1. Cursor Check: The connector checks dropbox_cursor_sync_point to see if a previous sync has occurred.
  2. Data Fetching:
  • Full Sync: If no cursor exists, it calls files/list_folder with recursive=True to fetch the entire drive hierarchy.
  • Incremental Sync: If a cursor exists, it calls files/list_folder/continue. Dropbox returns only items that changed since the last run.
  1. Generator Processing: The results are passed to _process_dropbox_items_generator which yields items one by one to manage memory usage.

Detailed Item Processing

For each entry, the system determines the specific metadata type and handles it accordingly:
  1. File Metadata (FileMetadata):
  • Duplicate Check: Calls get_record_by_external_id to see if the file is already in the database.
  • Metadata Extraction: Extracts MimeType (based on extension) and server_modified timestamps.
  • Preview Generation: Attempts to generate a web-viewable link using sharing/create_shared_link_with_settings.
  1. Folder Metadata (FolderMetadata):
  • Processed similarly to files but marked as a container type to maintain directory structure.
  1. Deleted Metadata (DeletedMetadata):
  • If Dropbox sends a deletion event, the record is flagged for removal.

Database Updates

  • New Records: Batched (default 100) and sent to on_new_records.
  • Updates: If the file hash or name changed, on_record_content_update or on_record_metadata_update is triggered.
  • Deletions: Records marked as deleted are removed via on_record_deleted.

Sharing & Permissions Sync

Simplified Model

Unlike the Teams connector which maps complex organizational roles (e.g., Editor, Viewer, Commenter), the Personal connector uses a simplified permission model.
  1. Default Ownership: Since this connector syncs a private drive, the authenticated user is automatically assigned OWNER permissions for every file and folder.
  2. Shared Links: The connector uses sharing.read to detect if a file has shared links. While it does not import the list of external users, it ensures the file metadata reflects that it is shared.