Integrations / Dropbox
Dropbox
Cloud file storage: browse, search, organise and share files and folders.
8 actions
OAuth 2
4 read3 write1 destructive
Calls api.dropboxapi.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "dropbox" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
account_info.read | Identify the connected Dropbox account |
files.metadata.read | See the names, paths and details of your files and folders |
files.content.write | Create, move and delete files and folders |
sharing.write | Create shared links for your files and folders |
Actions
Create folderwritedropbox.create_folderCreate a new folder at the given path in Dropbox, optionally renaming it automatically if the name is taken.
Needs scope: files.content.write
| Input | Type | Description | |
|---|---|---|---|
path | string | Required | Path of the new folder, e.g. /Homework/math |
autorename | boolean | Optional | If the name is taken, pick a different one instead of failing |
await setu.execute({
userId: "user_1",
action: "dropbox.create_folder",
input: {
"path": "<path>"
},
});Delete file or folderdestructivedropbox.deleteDelete the file or folder at a path. A folder is deleted with everything inside it. It can be restored from Dropbox's deleted files for a limited time.
Needs scope: files.content.write
| Input | Type | Description | |
|---|---|---|---|
path | string | Required | Path of the file or folder to delete |
await setu.execute({
userId: "user_1",
action: "dropbox.delete",
input: {
"path": "<path>"
},
confirm: true,
});Get file or folder detailsreaddropbox.get_metadataGet the details (type, name, size, modified time, id) of one file or folder by its path or id. The root folder is not supported.
Needs scope: files.metadata.read
| Input | Type | Description | |
|---|---|---|---|
path | string | Required | Path such as /Homework/math or an id such as id:a4ayc_80_OEAAAAAAAAAYa |
await setu.execute({
userId: "user_1",
action: "dropbox.get_metadata",
input: {
"path": "<path>"
},
});List folderreaddropbox.list_folderList the files and sub-folders directly inside a Dropbox folder. Use an empty string as the path for the root. Returns names, paths and a cursor for more.
Needs scope: files.metadata.read
| Input | Type | Description | |
|---|---|---|---|
path | string | Required | Folder path starting with a slash, e.g. /Homework/math. Use an empty string for the root. |
recursive | boolean | Optional | List every level below the folder (can be slow on big folders) |
limit | integer | Optional | Approximate maximum entries to return, 1 to 2000 |
await setu.execute({
userId: "user_1",
action: "dropbox.list_folder",
input: {
"path": "<path>"
},
});List folder (next page)readdropbox.list_folder_continueFetch the next page of a folder listing using the cursor returned by list_folder when has_more is true.
Needs scope: files.metadata.read
| Input | Type | Description | |
|---|---|---|---|
cursor | string | Required | Cursor from the previous list_folder or list_folder_continue reply |
await setu.execute({
userId: "user_1",
action: "dropbox.list_folder_continue",
input: {
"cursor": "<cursor>"
},
});Move or renamewritedropbox.moveMove a file or folder to a new path, or rename it by moving it within the same folder. Folder contents move too.
Needs scope: files.content.write
| Input | Type | Description | |
|---|---|---|---|
from_path | string | Required | Current path of the file or folder |
to_path | string | Required | New path, including the new name |
autorename | boolean | Optional | If the destination exists, pick a different name instead of failing |
await setu.execute({
userId: "user_1",
action: "dropbox.move",
input: {
"from_path": "<from_path>",
"to_path": "<to_path>"
},
});Search filesreaddropbox.searchSearch the user's Dropbox for files and folders by name or content. Optionally limit to a folder. Returns matching names and paths.
Needs scope: files.metadata.read
| Input | Type | Description | |
|---|---|---|---|
query | string | Required | Text to search for |
path | string | Optional | Only search inside this folder path |
max_results | integer | Optional | Maximum results, 1 to 1000 |
await setu.execute({
userId: "user_1",
action: "dropbox.search",
input: {
"query": "<query>"
},
});