Dropbox OAuth

Professional Dropbox API integration with OAuth 2.0 and automatic token refresh

Overview

This node integrates with Dropbox to list files and folders within a specified directory. It allows users to retrieve metadata about the contents of a folder, including options to filter results by shared status, mounted folders, recursion, media info, and deleted items. This operation is useful for workflows that need to dynamically explore or process files stored in Dropbox, such as syncing files, generating reports on folder contents, or triggering actions based on file presence.

Practical examples:

  • Listing all files in a project folder to trigger processing on new files.
  • Recursively listing all media files in a folder to generate thumbnails or metadata.
  • Filtering to include shared or mounted folders when aggregating team documents.

Properties

Name Meaning
Folder Path Path of the folder to list. Leave empty to list the root folder.
Limit Maximum number of entries to return (between 1 and 2000).
Filters Collection of filters to refine the listing:
- Include Shared Whether to include shared files and folders (true/false).
- Include Mounted Folders Whether to include mounted folders (true/false).
- Recursive Whether to list all files and folders recursively (true/false).
- Include Media Info Whether to include media info for photo and video files (true/false).
- Include Deleted Whether to include deleted files and folders (true/false).

Output

The output JSON object contains the following fields:

  • resource: Always "file" indicating the resource type.
  • operation: Always "list" indicating the operation performed.
  • path: The folder path that was listed.
  • entries: An array of file and folder entries returned by Dropbox API, each containing metadata about individual files/folders.
  • has_more: Boolean indicating if there are more entries available beyond the current response.
  • cursor: A cursor string for pagination to fetch additional entries if needed.
  • total_entries: Number of entries returned in this response.
  • filters_applied: The filters used during the listing operation.

This structure provides comprehensive information about the folder contents and supports pagination through the cursor and has_more fields.

Dependencies

  • Requires an OAuth 2.0 authenticated connection to Dropbox via an API key credential.
  • Uses Dropbox API endpoints, specifically files/list_folder.
  • Requires network access to Dropbox API servers.
  • No additional environment variables or external services beyond Dropbox OAuth credentials are necessary.

Troubleshooting

  • Common issues:

    • Invalid or expired OAuth token: The node attempts to refresh the token automatically but may fail if refresh credentials are invalid.
    • Incorrect folder path: Providing a non-existent or inaccessible folder path will result in errors from Dropbox API.
    • Exceeding limit: Setting the limit above 2000 will be capped automatically; setting it too low may miss expected files.
  • Error messages:

    • "OAuth token refresh failed": Indicates failure to obtain a valid access token; check OAuth credentials and connectivity.
    • "Dropbox operation failed": General error wrapper; inspect the inner message for details like permission denied or path not found.
  • Resolutions:

    • Verify OAuth credentials and re-authenticate if necessary.
    • Confirm folder paths exist and are accessible by the connected Dropbox account.
    • Adjust filters and limits to reasonable values.

Links and References

Discussion