mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 10:25:23 -04:00
Dropbox Trigger (Manual Webhook)
Overview
- Manual webhook trigger: users create their own Dropbox App and set the App's Webhook URL directly to this subscription endpoint.
- The trigger validates signatures and emits
file_changesthat includes the notified account IDs and resolved change entries from the entire Dropbox account.
Webhook Validation
- GET challenge echo: returns the
challengequery parameter verbatim. - Signature: verify
X-Dropbox-Signaturevia HMAC-SHA256 of the raw body using your Dropbox App Secret.
Subscription
- Parameters:
app_secret(required): used to validate webhook signatures.access_token(required): user access token to fetch file change details.
- Steps:
- In Dropbox App Console → your app → Settings → Webhooks, set the Webhook URL to:
https://<your-dify-host>/api/plugin/triggers/<subscription-id> - In Dify subscription UI, paste the App Secret and Access Token.
- In Dropbox App Console → your app → Settings → Webhooks, set the Webhook URL to:
Dispatch Flow
- Webhook arrives (POST). Validate signature.
- Extract
list_folder.accountsfrom payload (if present). - Fetch file changes recursively from entire Dropbox account (including deleted files).
- Emit
file_changeswith{ accounts, cursor_before, cursor_after, changes, raw, headers, received_at }.
Files
provider/dropbox.py: trigger dispatch (manual webhook)provider/dropbox.yaml: provider identity, schemas, and event registrationevents/file_changes/file_changes.yaml: event identity and output schema (name:file_changes)
Notes
- The trigger monitors the entire Dropbox account recursively, including deleted files.
- Change cursor is stored to track incremental updates between webhook notifications.