Dropbox OAuth

Professional Dropbox API integration with OAuth 2.0 and automatic token refresh

Overview

This node operation allows downloading the contents of a folder from Dropbox. It is useful when you want to retrieve all files within a specific folder in your Dropbox account, for example, to back up data, process multiple files in an automation workflow, or sync folder contents with another system.

The "Download" operation under the "Folder" resource downloads the entire folder's contents. This can be beneficial in scenarios such as:

  • Automating backup of project folders.
  • Retrieving batch files for processing or analysis.
  • Syncing Dropbox folder contents with local storage or other cloud services.

Properties

Name Meaning
File Path Path of the file to download (required). For folder download, this would be the folder path.
Return Format Format to return the downloaded file content: either as a Base64 encoded string or as a Buffer. Options: Base64, Buffer
Output Field The name of the field where the downloaded file content will be stored in the output JSON. Default is "data".

Note: Although the properties mention "File Path," for the Folder resource and Download operation, this refers to the folder path whose contents are being downloaded.

Output

The output JSON object includes metadata about the downloaded folder contents and the actual file data under the specified output field. The structure contains:

  • resource: Indicates the resource type, here it would be "folder".
  • operation: The operation performed, here "download".
  • path: The path of the folder downloaded.
  • metadata: Metadata information about the folder or files.
  • size: Size of the downloaded content in bytes.
  • content_type: Content type, typically "application/octet-stream" for binary data.
  • <outputField>: The actual content of the downloaded folder, either as a base64 string or buffer depending on the selected return format.

If binary data is returned, it represents the raw contents of the folder files packaged by Dropbox.

Dependencies

  • Requires a valid OAuth 2.0 access token for Dropbox API authentication.
  • Uses Dropbox API endpoints for file and folder operations.
  • Requires network connectivity to Dropbox API servers.
  • The node expects an OAuth handler URL or direct access token for authentication management.

Troubleshooting

  • OAuth Token Issues: If the access token is missing or expired, the node attempts to refresh it via an OAuth handler service. Failure to refresh will cause errors. Ensure the OAuth credentials are correctly configured and the handler URL is accessible.
  • Invalid Paths: Providing incorrect or non-existent folder paths will result in API errors. Verify the folder path exists in Dropbox.
  • API Rate Limits: Dropbox enforces rate limits; excessive requests may lead to temporary failures.
  • Return Format Mismatch: Selecting "Buffer" requires downstream nodes to handle binary data properly; otherwise, use "Base64" for safer text-based handling.

Common error messages:

  • "OAuth token refresh failed": Check OAuth credentials and handler service.
  • "Unknown folder operation": Confirm the operation parameter is set to "download".
  • "Dropbox operation failed": General failure, check error details for specifics.

Links and References

Discussion