Skip to main content

Dropbox ExecModule

Overview

DropboxModule connects ValkyrAI workflows to Dropbox API v2 for account identity, file and folder metadata, search, bounded upload/download, organization, deletion, and shared-link creation. It uses the native map I/O ExecModule ABI, is annotation-discoverable as DropboxModule, and resolves its OAuth access token only from a READY IntegrationAccount.

The operation set follows the most useful file, folder, and search behavior in n8n's Dropbox node while adding ValkyrAI's trusted-host boundary, explicit destructive acknowledgements, bounded payloads, safe-read retries, stable errors, and credential redaction:

  • get_current_account
  • list_folder
  • get_metadata
  • search
  • download_file
  • upload_file
  • create_folder
  • copy_path
  • move_path
  • delete_path
  • create_shared_link

Workflow input cannot override the Dropbox API origins or authentication headers.

Usage

  1. Create a Dropbox scoped app with App folder or Full Dropbox access according to the workflow boundary.
  2. Enable only the OAuth scopes required by the selected operations.
  3. Complete OAuth authorization and store the current access token in the encrypted apiKey field of a ValkyrAI IntegrationAccount.
  4. Set the account status to READY and bind it through ExecModuleConfig.authConfig.integrationAccount.
  5. Add DropboxModule, select one operation, and map the operation-specific fields from configuration or upstream state.
  6. For destructive or externally visible actions, provide the documented acknowledgement immediately before execution.

Mapped inputs can override non-secret operation parameters. Credentials, API hosts, timeout policy, and retry policy remain trusted application configuration.

Inputs

NameTypeRequirementDefaultDescription and constraints
operationstringRequiredNoneOne of the eleven operations above.
pathstringRequired except get_current_account; optional root for list/searchEmpty root for list/searchAbsolute Dropbox path without a trailing slash. Read/delete/copy/move/share operations also accept provider id: references. Maximum 4,096 characters; control characters are rejected.
destinationPathstringRequired for copy/moveNoneAbsolute Dropbox destination path, different from path.
querystringRequired for searchNone1–1,000 safe characters.
cursorstringOptional for list/searchNoneOpaque continuation cursor from a previous response. Maximum 8,192 characters; never inspect or alter it.
recursivebooleanOptional for listfalseInclude all descendants. Large trees remain capped by limit.
includeDeletedbooleanOptional for list/searchfalseInclude deleted list entries or search only deleted items.
includeMountedFoldersbooleanOptional for listtrueInclude mounted app, shared, and team folders.
includeNonDownloadableFilesbooleanOptional for listtrueInclude provider-native entries that cannot be downloaded through the content endpoint.
limitintegerOptional for list/search100Total returned items, 1–10,000. Provider requests are capped at 2,000 list entries or 1,000 search matches per page.
maxDownloadBytesintegerOptional for download10485760Maximum response bytes, 1–52,428,800. Oversized content is rejected rather than partially emitted.
contentTextstringConditional for uploadNoneUTF-8 content. Exactly one of contentText or contentBase64; empty text is valid.
contentBase64stringConditional for uploadNoneBase64 content. Maximum 5 MiB after decoding.
modestringOptional for uploadaddadd, overwrite, or update.
revisionstringRequired when mode=updateNoneDropbox revision token, 1–256 safe token characters.
autorenamebooleanOptional for upload/create/copy/movefalseAsk Dropbox to choose a non-conflicting destination name.
mutebooleanOptional for uploadfalseSuppress provider notifications for the write where supported.
strictConflictbooleanOptional for uploadfalseEnable strict Dropbox write-conflict behavior.
confirmOverwritebooleanRequired for overwrite uploadfalseMust be true because the operation can replace existing content.
confirmDeletebooleanRequired for deletefalseMust be true immediately before delete_path.
confirmSharedLinkbooleanRequired for shared link creationfalseMust be true because the operation creates an externally usable access path.
requestedVisibilitystringOptional for shared linkpublicpublic or team_only; the provider and team policy may narrow the result.
allowDownloadbooleanOptional for shared linktrueRequest whether link recipients can download.

Outputs

Every execution returns status, operation, and attempts.

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation name.
attemptsintegerAlwaysProvider HTTP attempts, including followed list/search pages.
httpStatusintegerProvider response receivedLast Dropbox HTTP status.
dataobjectSingle-resource and download successProvider metadata, account, write, or shared-link result normalized to JSON-compatible values.
idstringProvider result contains oneConvenience Dropbox resource ID.
namestringProvider result contains oneConvenience file/folder name.
path_displaystringProvider result contains oneProvider-cased display path.
urlstringShared-link successCreated Dropbox shared-link URL.
itemsarrayList/search successBounded provider entries or search matches.
countintegerList/search successNumber of returned items.
hasMorebooleanList/search successWhether Dropbox reports another page.
cursorstringProvider supplies oneOpaque cursor for later continuation or reconciliation.
contentBytesintegerDownload successDownloaded byte count.
contentBase64stringDownload successBounded content for binary-aware downstream steps.
mimeTypestringDownload successProvider content type or application/octet-stream.
requestIdstringDropbox supplies onex-dropbox-request-id for provider support and diagnostics.
errorobjectFailureRedacted {code, message, httpStatus?, retryable} details.

OAuth tokens never appear in outputs or logs. Provider error text is bounded and passed through the shared workflow sensitive-data policy.

IntegrationAccount Requirements

SettingRequirement
ProviderDropbox API v2
AuthenticationOAuth 2.0 bearer access token
statusExactly READY
accountNameHuman-readable Dropbox account or team label
apiKeyPreferred encrypted SecureField containing the current access token
passwordLegacy access-token fallback only; prefer apiKey
RelationshipExecModuleConfig.authConfig.integrationAccount

Recommended least-privilege scopes:

  • Account identity: account_info.read
  • Metadata, list, and search: files.metadata.read
  • Download: files.content.read
  • Upload, create, copy, move, and delete: files.content.write
  • Shared-link creation: sharing.write

Choose App folder access when the workflow needs only its managed subtree. Use Full Dropbox only when business requirements require broader paths. Refresh-token exchange and token rotation belong to the platform authorization lifecycle; never place app secrets, refresh tokens, or access tokens in workflow parameters, input maps, examples, or logs.

Configuration

Illustrative persisted configuration:

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:dropbox-release-artifacts"
},
"retryPolicy": {
"maxAttempts": 3,
"backoffStrategy": "EXPONENTIAL",
"initialDelayMs": 1000,
"maxDelayMs": 60000,
"jitter": false
},
"executionConfig": {
"timeoutMs": 30000
},
"payloadConfig": {
"parameters": "{\"operation\":\"list_folder\",\"path\":\"/Launch\",\"limit\":250}"
}
}

The relationship value is symbolic. Persisted workflows use the generated relationship to the encrypted account record.

Operations

OperationDropbox API routeSide effect and retry contract
get_current_accountusers/get_current_accountRead-only; transient retries allowed.
list_folderfiles/list_folder and /continueRead-only; follows opaque cursors up to limit.
get_metadatafiles/get_metadataRead-only; transient retries allowed.
searchfiles/search_v2 and /continue_v2Read-only; follows opaque cursors up to limit.
download_filecontent.dropboxapi.com/2/files/downloadRead-only bounded binary response; transient retries allowed.
upload_filecontent.dropboxapi.com/2/files/uploadSingle attempt; overwrite requires acknowledgement.
create_folderfiles/create_folder_v2Single attempt; may create a duplicate after an ambiguous timeout.
copy_pathfiles/copy_v2Single attempt; preserves source.
move_pathfiles/move_v2Single attempt; changes the source path.
delete_pathfiles/delete_v2Single attempt; explicit acknowledgement required.
create_shared_linksharing/create_shared_link_with_settingsSingle attempt; explicit acknowledgement required.

Errors and Failure Modes

CodeTypical causeRetry guidance
VALIDATION_ERRORMissing/unsafe path or query, invalid cursor/revision/base64/mode, incompatible content fields, oversized upload, or missing acknowledgement.Correct inputs; no provider request is sent.
UNSUPPORTED_OPERATIONUnknown operation.Select a documented operation.
INTEGRATION_ACCOUNT_REQUIREDNo secure account relationship is bound.Bind the intended Dropbox account.
INTEGRATION_ACCOUNT_NOT_READYAccount status is not READY.Repair or reauthorize the account.
CREDENTIAL_MISSINGNo access token is present.Refresh authorization and store the token in the encrypted field.
DROPBOX_INVALID_ACCESS_TOKEN / HTTP 401Token is expired, revoked, or invalid.Refresh the OAuth session.
HTTP 403App access type, team policy, or scope forbids the action.Correct app/scopes/team policy; do not broaden access unnecessarily.
DROPBOX_PATH / HTTP 409Missing path, conflict, revision mismatch, or unsupported path state.Inspect the bounded provider summary and reconcile current metadata.
HTTP 429Dropbox rate limit.Safe reads honor Retry-After and bounded backoff. Writes remain single-attempt.
DOWNLOAD_TOO_LARGEContent exceeded maxDownloadBytes.Raise the bounded limit or use an external streaming workflow.
RESPONSE_TOO_LARGEJSON response exceeded 5 MiB.Narrow the query/page and retry.
NETWORK_ERRORTimeout, DNS, TLS, or connectivity failure.Reads may retry. Reconcile write state before any manual retry.
INVALID_PROVIDER_RESPONSEList/search response lacks the expected array.Use requestId and inspect API compatibility.

Dropbox path errors use tagged error_summary values. The module converts the leading tag to a stable error code, redacts credentials, and limits human-readable text to 500 characters.

Example

Upload a Markdown release brief without overwriting an existing file:

{
"operation": "upload_file",
"path": "/Launch/release-brief.md",
"mode": "add",
"autorename": true,
"contentText": "# Release brief\n\n- Verify rollout\n- Notify the team"
}

Expected normalized result shape:

{
"status": "success",
"operation": "upload_file",
"attempts": 1,
"httpStatus": 200,
"id": "id:example",
"name": "release-brief.md",
"path_display": "/Launch/release-brief.md",
"data": {
".tag": "file",
"id": "id:example",
"name": "release-brief.md",
"path_display": "/Launch/release-brief.md",
"rev": "example-revision"
}
}

Notes

  • Pagination: list_folder and search follow provider cursors until exhaustion or limit. A supplied cursor starts from that continuation endpoint. Cursors are opaque and can expire when provider state changes.
  • Rate limits: HTTP 408, 429, 500, 502, 503, and 504 are transient. Only account, metadata, list, search, and download operations retry automatically. Numeric and RFC 1123 Retry-After values are honored within the configured 60-second cap.
  • API limits: ValkyrAI caps results at 10,000, uploads at 5 MiB, JSON responses at 5 MiB, downloads at 50 MiB, and request cursors/paths at bounded lengths. Dropbox may enforce stricter plan, namespace, team, or endpoint limits.
  • Idempotency: all writes are single-attempt because a timed-out provider call may have committed. mode=add plus autorename=false, update-mode revisions, deterministic destinations, metadata lookup, and cursor/request-ID reconciliation help prevent duplicates.
  • Uploads: this release uses the simple /files/upload route. Upload sessions, chunked transfer, and large-file commit are intentionally deferred.
  • Downloads: content is base64-encoded for the map ABI. Dropbox Paper or other non-downloadable provider-native entries require an export-capable workflow that is outside this version.
  • Destructive behavior: delete_path can remove a file or an entire folder tree and requires confirmDelete=true. Dropbox may retain deleted content for a plan-defined recovery period, but recovery is not guaranteed by this module. move_path and overwrite uploads can also disrupt downstream links or revisions.
  • Sharing: create_shared_link requires confirmSharedLink=true. Dropbox team policy can narrow requested visibility or forbid public links. Link revocation, password/expiry management, membership, and shared-folder administration are deferred.
  • External behavior: deterministic local tests cover validation, authentication headers, binary transfer, pagination, retries, single-attempt writes, acknowledgements, redaction, response mapping, and metadata discovery. Live Dropbox execution remains deferred until an explicitly authorized account is supplied.
  • Functional reference: the official n8n Dropbox node and current n8n source informed the file/folder/search operation set. Dropbox's HTTP API reference and OAuth guide define provider behavior and scopes.