Dropbox OAuth

Professional Dropbox API integration with OAuth 2.0 and automatic token refresh

Overview

This node performs a search query operation on Dropbox to find files and folders matching specified criteria. It allows users to search by text query, filter results by file status (active, deleted, or both), file categories (images, documents, videos, etc.), file extensions, folder path, and limit the number of results returned.

Common scenarios include:

  • Finding specific files or folders in a large Dropbox account based on keywords.
  • Filtering search results to only certain types of files like PDFs or images.
  • Limiting search scope to a particular folder.
  • Retrieving a manageable number of search results for further processing in workflows.

Practical example: A user wants to find all active PDF documents related to "invoice" within a specific folder and process them downstream in an automation workflow.

Properties

Name Meaning
Query Search query string; can be fixed text or an expression to specify search terms.
File Status Filter by file status:
- Active: only non-deleted files
- Deleted: only deleted files
- Both: active and deleted files
Filters Collection of optional filters including:
• File Categories: select one or more categories such as Images, Documents, Videos, Audio, Archives, PDFs, Spreadsheets, Presentations.
• File Extensions: comma-separated list of file extensions to filter by (e.g., jpg,png,pdf).
• Folder: limit search to a specific folder path.
• Max Results: maximum number of search results to return (1-1000).

Output

The output JSON object contains the following fields:

  • resource: Always "search" indicating the resource type.
  • operation: Always "query" indicating the operation performed.
  • query: The original search query string used.
  • file_status: The file status filter applied (active, deleted, or both).
  • matches: An array of matched files and folders returned by Dropbox API, each containing metadata about the item.
  • has_more: Boolean indicating if there are more results available beyond the current batch.
  • total_matches: Number of matches returned in this response.
  • search_filters: The filters object as provided in input.
  • applied_options: The actual options sent to the Dropbox API, including resolved file extensions and folder path.

No binary data is output by this operation.

Dependencies

  • Requires an OAuth 2.0 authenticated connection to Dropbox with appropriate permissions to perform search operations.
  • Needs an API access token which is refreshed automatically via an external OAuth handler service.
  • Uses Dropbox API endpoint https://api.dropboxapi.com/2/files/search_v2 for searching files and folders.

Troubleshooting

  • Common issues:

    • Invalid or expired OAuth token: The node attempts to refresh the token automatically but may fail if the OAuth handler service is unreachable or misconfigured.
    • Exceeding max results limit: The node enforces a maximum of 1000 results; requesting more will be capped.
    • Incorrect folder path or file extension filters may result in no matches found.
  • Error messages:

    • "OAuth token refresh failed: ..." indicates failure to obtain a valid access token; check OAuth credentials and connectivity to the token refresh service.
    • "Dropbox operation failed: ..." indicates an error from the Dropbox API; verify input parameters and API permissions.

Links and References

Discussion