Dropbox OAuth

Professional Dropbox API integration with OAuth 2.0 and automatic token refresh

Overview

This node operation lists the contents of a folder in Dropbox. It allows users to retrieve files and subfolders within a specified folder path, with options to filter and control the scope of the listing. This is useful for workflows that need to process or analyze files stored in Dropbox, automate file management tasks, or synchronize folder contents.

Practical examples include:

  • Automatically listing all files in a project folder to trigger further processing.
  • Retrieving a list of shared or mounted folders for audit or reporting.
  • Recursively listing all files and folders under a root directory to build an inventory.

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 files and folders shared with the user.
- Include Mounted Folders Whether to include folders mounted from other accounts or locations.
- Recursive Whether to list all files and folders recursively within subfolders.
- Include Media Info Whether to include media metadata for photo and video files.
- Include Deleted Whether to include deleted files and folders in the listing.

Output

The output JSON object contains the following fields:

  • resource: Always "file" indicating the type of resource listed.
  • operation: Always "list" indicating the performed operation.
  • path: The folder path that was listed (empty string if root).
  • entries: An array of objects representing files and folders found in the specified path. Each entry includes metadata as returned by Dropbox API.
  • 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 has_more is true.
  • total_entries: Number of entries returned in this response.
  • filters_applied: Object reflecting the filters used during the listing.

No binary data is output by this operation.

Dependencies

  • Requires a valid OAuth 2.0 access token for Dropbox API authentication.
  • Uses Dropbox API endpoints, specifically files/list_folder.
  • Requires configuration of an OAuth credential with automatic token refresh support.
  • Network connectivity to Dropbox API endpoints is 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 or missing.
    • Incorrect folder path: Specifying a non-existent or inaccessible folder path will result in an error from Dropbox API.
    • Exceeding limit: The maximum allowed limit is 2000; setting higher values will be capped.
  • Error messages:

    • "OAuth token refresh failed": Indicates failure to obtain a new access token; check OAuth credential setup.
    • "Dropbox operation failed": Generic error wrapper; inspect the inner message for details such as permission issues or invalid paths.
  • Resolution tips:

    • Verify OAuth credentials and permissions.
    • Confirm folder paths exist and are accessible.
    • Use smaller limits if encountering timeouts or performance issues.

Links and References

Discussion