Dropbox OAuth

Professional Dropbox API integration with OAuth 2.0 and automatic token refresh

Overview

This node enables uploading files to a Dropbox folder using the Dropbox API. It is designed for scenarios where you want to programmatically add or update files in a specific Dropbox path, such as automating backups, syncing files from other systems, or integrating file uploads into workflows.

For example, you can use this node to upload images generated by another process directly into a Dropbox folder, or to update documents automatically when changes occur elsewhere.

Properties

Name Meaning
Upload Path The full path in Dropbox where the file will be uploaded (e.g., /path/to/upload/file.jpg). This is required.
File Content The content of the file to upload, provided as a Base64 encoded string or binary data. This is required.
Overwrite Boolean option indicating whether to overwrite an existing file at the upload path (true) or add a new file without overwriting (false).

Output

The node outputs a JSON object containing details about the uploaded file:

  • resource: Always "file".
  • operation: Always "upload".
  • uploaded_file: An object with metadata returned by Dropbox about the uploaded file, including its path, id, and other Dropbox-specific information.

No binary output is produced by this operation; the file content is sent to Dropbox but not returned.

Dependencies

  • Requires a valid OAuth 2.0 access token for Dropbox API authentication.
  • The node uses the Dropbox API endpoints for file upload.
  • Proper credentials must be configured in n8n to authorize API requests.

Troubleshooting

  • Invalid or expired access token: The node attempts to refresh the token via an OAuth handler URL if the token is missing or expired. If refreshing fails, an error "OAuth token refresh failed" will be thrown. Ensure your OAuth credentials are correctly set up and the refresh endpoint is accessible.
  • File path errors: Providing an invalid or inaccessible upload path may cause the Dropbox API to reject the request. Verify the path format and permissions.
  • Overwrite conflicts: If Overwrite is set to false and a file already exists at the target path, Dropbox will rename the new file automatically unless autorename is disabled. Check the behavior if unexpected duplicates appear.
  • Base64 encoding issues: Ensure that the File Content property contains properly Base64 encoded data or valid binary data; otherwise, the upload will fail.

Links and References

Discussion