Dropbox
Upload, download, list, and share files in Dropbox.
On this page
- Connect
- Call it from a workflow
- Actions (14)
- downloadFile
- copy_dropbox_file
- copy_dropbox_folder
- create_new_dropbox_folder
- create_new_dropbox_text_file
- custom_api_call
- delete_dropbox_file
- delete_dropbox_folder
- get_dropbox_file_link
- list_dropbox_folder
- move_dropbox_file
- move_dropbox_folder
- search_dropbox
- upload_dropbox_file
- Details
Connect
Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("dropbox", action, input) resolves with the provider's answer and rejects when Dropbox isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "dropbox"} says whether yours can call it.
// workflows/notify.ts: call Dropbox when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellDropbox = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Dropbox isn't connected.
const output = await step.run("Dropbox", () =>
step.ctx.integrations.invoke("dropbox", "downloadFile", {
"path": "<path>"
}),
);
step.ctx.log("Dropbox answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "dropbox",
"piece_action": "downloadFile",
"input": {
"path": "<path>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/dropbox/downloadFile" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"path":"<path>"}}'Actions
downloadFile
Download File. Download a File from Dropbox
Also accepted as download_file.
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the file (e.g. /folder1/file.txt) |
copy_dropbox_file
Copy file. Copy a file
| Input | Type | Description |
|---|---|---|
from_pathrequired | text | The source path of the file (e.g. /folder1/sourcefile.txt) |
to_pathrequired | text | The destination path for the copied (e.g. /folder2/destinationfile.txt) |
autorenameoptional | boolean | If there's a conflict, have the Dropbox server try to autorename the file to avoid conflict. |
allow_ownership_transferoptional | boolean | Allows copy by owner even if it would result in an ownership transfer. |
copy_dropbox_folder
Copy folder. Copy a folder
| Input | Type | Description |
|---|---|---|
from_pathrequired | text | The source path of the folder (e.g. /folder1/sourceFolder) |
to_pathrequired | text | The destination path for the copied folder (e.g. /folder2/destinationFolder) |
autorenameoptional | boolean | If there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict. |
allow_ownership_transferoptional | boolean | Allows copy by owner even if it would result in an ownership transfer. |
create_new_dropbox_folder
Create New Folder. Create a new empty folder
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the new folder e.g. /Homework/math |
autorenameoptional | boolean | If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False. |
create_new_dropbox_text_file
Create New Text File. Create a new text file from text input
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the new folder e.g. /Homework/math |
textrequired | long text | The text to write into the file. |
autorenameoptional | boolean | If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False. |
muteoptional | boolean | Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn't result in … |
strict_conflictoptional | boolean | Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given "rev" doesn't match the existing file's "rev", even if… |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
delete_dropbox_file
Delete file. Delete a file
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the file to be deleted (e.g. /folder1/file.txt) |
delete_dropbox_folder
Delete folder. Delete a folder
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the folder to be deleted (e.g. /folder1) |
get_dropbox_file_link
Get temporary file link. Get a temporary file link
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the file (e.g. /folder1/file.txt) |
list_dropbox_folder
List a folder. List the contents of a folder
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path of the folder to be listed (e.g. /folder1). Use an empty string for the root folder. |
recursiveoptional | boolean | If set to true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. |
limitoptional | number | The maximum number of results to return (between 1 and 2000). Default is 2000 if not specified. |
move_dropbox_file
Move file. Move a file
| Input | Type | Description |
|---|---|---|
from_pathrequired | text | The current path of the file (e.g. /folder1/oldfile.txt) |
to_pathrequired | text | The new path for the file (e.g. /folder2/newfile.txt) |
autorenameoptional | boolean | If there's a conflict, have the Dropbox server try to autorename the file to avoid conflict. |
allow_ownership_transferoptional | boolean | Allows moves by owner even if it would result in an ownership transfer. |
move_dropbox_folder
Move folder. Move a folder
| Input | Type | Description |
|---|---|---|
from_pathrequired | text | The current path of the folder (e.g. /folder1/sourceFolder) |
to_pathrequired | text | The new path for the folder (e.g. /folder2/destinationFolder) |
autorenameoptional | boolean | If there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict. |
allow_ownership_transferoptional | boolean | Allows moves by owner even if it would result in an ownership transfer. |
search_dropbox
Search. Search for files and folders
| Input | Type | Description |
|---|---|---|
queryrequired | text | The search string. Must be at least 3 characters. |
pathoptional | text | The path to search in. If not specified, the search is performed from the root. |
max_resultsoptional | number | The maximum number of search results to return (up to 1000). Default is 100 if not specified. |
order_byoptional | one of "relevance" | "modified_time" | Specified property of the order of search results. |
file_statusoptional | one of "active" | "deleted" | Restricts search to the given file status. |
filename_onlyoptional | boolean | Restricts search to only match on filenames. |
file_extensionsoptional | text | Restricts search to only the extensions specified (comma-separated). |
file_categoriesoptional | text | Restricts search to only the file categories specified (comma-separated). |
account_idoptional | text | Restricts results to the given account id. |
upload_dropbox_file
Upload file. Upload a file
| Input | Type | Description |
|---|---|---|
pathrequired | text | The path where the file should be saved (e.g. /folder1/file.txt) |
filerequired | file | The file URL or base64 to upload |
autorenameoptional | boolean | If there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict. |
muteoptional | boolean | Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn't result in … |
strict_conflictoptional | boolean | Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given "rev" doesn't match the existing file's "rev", even if… |
Details
- Id
dropbox- Category
- Data and storage
- Tags
- storage, files, sync, sharing
- Package
@activepieces/piece-dropbox@0.7.0- Runs
- Through the integration runner