Dropbox

Upload, download, list, and share files in Dropbox.

Data and storageOAuth14 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (14)
  4. downloadFile
  5. copy_dropbox_file
  6. copy_dropbox_folder
  7. create_new_dropbox_folder
  8. create_new_dropbox_text_file
  9. custom_api_call
  10. delete_dropbox_file
  11. delete_dropbox_folder
  12. get_dropbox_file_link
  13. list_dropbox_folder
  14. move_dropbox_file
  15. move_dropbox_folder
  16. search_dropbox
  17. upload_dropbox_file
  18. 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.

Workflow
// 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);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "dropbox",
    "piece_action": "downloadFile",
    "input": {
      "path": "<path>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
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.

InputTypeDescription
pathrequiredtextThe path of the file (e.g. /folder1/file.txt)

copy_dropbox_file

Copy file. Copy a file

InputTypeDescription
from_pathrequiredtextThe source path of the file (e.g. /folder1/sourcefile.txt)
to_pathrequiredtextThe destination path for the copied (e.g. /folder2/destinationfile.txt)
autorenameoptionalbooleanIf there's a conflict, have the Dropbox server try to autorename the file to avoid conflict.
allow_ownership_transferoptionalbooleanAllows copy by owner even if it would result in an ownership transfer.

copy_dropbox_folder

Copy folder. Copy a folder

InputTypeDescription
from_pathrequiredtextThe source path of the folder (e.g. /folder1/sourceFolder)
to_pathrequiredtextThe destination path for the copied folder (e.g. /folder2/destinationFolder)
autorenameoptionalbooleanIf there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict.
allow_ownership_transferoptionalbooleanAllows copy by owner even if it would result in an ownership transfer.

create_new_dropbox_folder

Create New Folder. Create a new empty folder

InputTypeDescription
pathrequiredtextThe path of the new folder e.g. /Homework/math
autorenameoptionalbooleanIf 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

InputTypeDescription
pathrequiredtextThe path of the new folder e.g. /Homework/math
textrequiredlong textThe text to write into the file.
autorenameoptionalbooleanIf there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False.
muteoptionalbooleanNormally, 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_conflictoptionalbooleanBe 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

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

delete_dropbox_file

Delete file. Delete a file

InputTypeDescription
pathrequiredtextThe path of the file to be deleted (e.g. /folder1/file.txt)

delete_dropbox_folder

Delete folder. Delete a folder

InputTypeDescription
pathrequiredtextThe path of the folder to be deleted (e.g. /folder1)

Get temporary file link. Get a temporary file link

InputTypeDescription
pathrequiredtextThe path of the file (e.g. /folder1/file.txt)

list_dropbox_folder

List a folder. List the contents of a folder

InputTypeDescription
pathrequiredtextThe path of the folder to be listed (e.g. /folder1). Use an empty string for the root folder.
recursiveoptionalbooleanIf set to true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.
limitoptionalnumberThe maximum number of results to return (between 1 and 2000). Default is 2000 if not specified.

move_dropbox_file

Move file. Move a file

InputTypeDescription
from_pathrequiredtextThe current path of the file (e.g. /folder1/oldfile.txt)
to_pathrequiredtextThe new path for the file (e.g. /folder2/newfile.txt)
autorenameoptionalbooleanIf there's a conflict, have the Dropbox server try to autorename the file to avoid conflict.
allow_ownership_transferoptionalbooleanAllows moves by owner even if it would result in an ownership transfer.

move_dropbox_folder

Move folder. Move a folder

InputTypeDescription
from_pathrequiredtextThe current path of the folder (e.g. /folder1/sourceFolder)
to_pathrequiredtextThe new path for the folder (e.g. /folder2/destinationFolder)
autorenameoptionalbooleanIf there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict.
allow_ownership_transferoptionalbooleanAllows moves by owner even if it would result in an ownership transfer.

search_dropbox

Search. Search for files and folders

InputTypeDescription
queryrequiredtextThe search string. Must be at least 3 characters.
pathoptionaltextThe path to search in. If not specified, the search is performed from the root.
max_resultsoptionalnumberThe maximum number of search results to return (up to 1000). Default is 100 if not specified.
order_byoptionalone of "relevance" | "modified_time"Specified property of the order of search results.
file_statusoptionalone of "active" | "deleted"Restricts search to the given file status.
filename_onlyoptionalbooleanRestricts search to only match on filenames.
file_extensionsoptionaltextRestricts search to only the extensions specified (comma-separated).
file_categoriesoptionaltextRestricts search to only the file categories specified (comma-separated).
account_idoptionaltextRestricts results to the given account id.

upload_dropbox_file

Upload file. Upload a file

InputTypeDescription
pathrequiredtextThe path where the file should be saved (e.g. /folder1/file.txt)
filerequiredfileThe file URL or base64 to upload
autorenameoptionalbooleanIf there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.
muteoptionalbooleanNormally, 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_conflictoptionalbooleanBe 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