Better Dropbox icon

Better Dropbox

Interact with Dropbox API

Overview

This node allows uploading files to Dropbox, supporting two main upload methods: uploading a file from binary data available in the workflow or downloading a file from a specified URL and then uploading it. It handles both small files with a simple upload method and large files with chunked uploads to accommodate Dropbox API limits.

Common scenarios include:

  • Automating backup of files generated or processed within n8n workflows.
  • Uploading files fetched from external URLs directly into Dropbox.
  • Sharing uploaded files publicly by generating public URLs automatically.

Practical examples:

  • Uploading images or documents received via webhook or other nodes directly to a Dropbox folder.
  • Downloading reports or exports from a web service URL and saving them to Dropbox for archival.
  • Automatically creating public links for uploaded files to share externally.

Properties

Name Meaning
Upload from URL Whether to upload a file by downloading it from a given URL instead of using binary data from the input item.
URL The URL to download the file from (required if "Upload from URL" is true).
Binary Property The name of the binary property containing the file data to upload (required if "Upload from URL" is false).
Dropbox Path The folder path on Dropbox where the file will be saved. Must start with "/".
File Name The name of the file to save on Dropbox, including its extension.
Options - Mode How to handle file conflicts: "Add" to create a new file or "Overwrite" to replace an existing file.
Options - Output Public File URL Whether to generate a public URL for the uploaded file. Requires additional sharing permissions enabled in the Dropbox account.

Output

The node outputs an array of JSON objects, each representing the metadata of the uploaded file as returned by the Dropbox API. This includes details such as file ID, path, size, and other Dropbox-specific metadata.

If the option to generate a public file URL is enabled, the output JSON will also contain a public_url field with the shared link URL or a public_url_error field describing any issues encountered during link creation.

No binary data is output by this node; it only returns JSON metadata about the uploaded files.

Dependencies

  • Requires a valid Dropbox OAuth2 API credential with appropriate scopes.
  • If public URL generation is enabled, the credential must have the sharing.write permission.
  • Uses Dropbox API endpoints for file upload and sharing.
  • For downloading files from URLs, performs HTTP GET requests with standard headers.

Troubleshooting

  • No valid access token found: Ensure your Dropbox credentials are connected properly and contain a valid access token. Reconnect the account if necessary.
  • Missing sharing permissions: If public URL generation fails with missing scope errors, reconnect your Dropbox account ensuring the sharing permission is granted.
  • File too large errors: Files larger than ~150 MB are uploaded in chunks automatically. If chunked upload fails, check network stability and retry.
  • Download from URL failures: Verify the URL is accessible and returns data. Network issues or invalid URLs will cause download errors.
  • Rate limit errors: The node retries automatically on rate limiting but excessive usage may require reducing request frequency.
  • Authentication errors (401): Usually indicate expired or invalid tokens. Re-authenticate your Dropbox connection.

Links and References

Discussion