ByteChef LogoByteChef

Dropbox

Dropbox is a file hosting service that offers cloud storage, file synchronization, personal cloud, and client software.

Categories: File Storage

Type: dropbox/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdApp KeySTRINGtrue
clientSecretApp SecretSTRINGtrue

anl-c-dropbox-md

Connection Setup

Connect Dropbox to ByteChef using OAuth 2.0 (Authorization Code).

Create a Dropbox OAuth app

  1. Open the App Console. Click on Create app.
  2. In Choose an API, select Scoped access. Choose the type of access you need and enter a name for your app. Click Create app.
  3. Add the ByteChef OAuth redirect (callback) URL(s):
    • Cloud: https://app.bytechef.io/callback
    • Local development: http://localhost:5173/callback
  4. Click on Show.
  5. Copy the App key and Secret.
  6. Go to Permissions tab.
  7. Select scopes: files.metadata.write, files.content.write, files.content.read and openId.
  8. Click Submit.

Actions

Copy File

Name: copyFile

Copy a file to a different location in the user's Dropbox.

Properties

NameLabelTypeDescriptionRequired
from_pathSource PathSTRINGThe source path of the file.true
to_pathDestination PathSTRINGThe destination path for the copied file.true
autorenameAuto RenameBOOLEAN
Options true, false
If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict.false

Example JSON Structure

{
  "label" : "Copy File",
  "name" : "copyFile",
  "parameters" : {
    "from_path" : "",
    "to_path" : "",
    "autorename" : false
  },
  "type" : "dropbox/v1/copyFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the copied file.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find File Path

To find the file path, click here.

Copy Folder

Name: copyFolder

Copy folder to a different location in the user's Dropbox. All content of the folder will be copied.

Properties

NameLabelTypeDescriptionRequired
from_pathFrom PathSTRINGThe source path of the folder.true
to_pathDestination PathSTRINGThe destination path for the copied folder.true
autorenameAuto RenameBOOLEAN
Options true, false
If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.false

Example JSON Structure

{
  "label" : "Copy Folder",
  "name" : "copyFolder",
  "parameters" : {
    "from_path" : "",
    "to_path" : "",
    "autorename" : false
  },
  "type" : "dropbox/v1/copyFolder"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the copied folder.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find Folder Path

To find the folder path, click here.

Create Folder

Name: createFolder

Creates an empty folder at a given path.

Properties

NameLabelTypeDescriptionRequired
pathFolder Path/NameSTRINGThe path of the new folder. Root is /.true

Example JSON Structure

{
  "label" : "Create Folder",
  "name" : "createFolder",
  "parameters" : {
    "path" : ""
  },
  "type" : "dropbox/v1/createFolder"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the newly created folder.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find Folder Path

To find the folder path, click here.

Create New Paper File

Name: createTextFile

Create a new .paper file on which you can write at a given path

Properties

NameLabelTypeDescriptionRequired
pathPathSTRINGThe path of the new paper file. Root is /.true
filenameFilenameSTRINGName of the paper filetrue
textTextSTRINGThe text to write into the file.true
autorenameAuto RenameBOOLEAN
Options true, false
If there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.false
muteMuteBOOLEAN
Options true, false
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 a user notification.false
strict_conflictStrict ConflictBOOLEAN
Options true, false
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 the existing file has been deleted.false

Example JSON Structure

{
  "label" : "Create New Paper File",
  "name" : "createTextFile",
  "parameters" : {
    "path" : "",
    "filename" : "",
    "text" : "",
    "autorename" : false,
    "mute" : false,
    "strict_conflict" : false
  },
  "type" : "dropbox/v1/createTextFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
nameSTRINGThe name of the newly created file, including its extension. This is the last component of the path.
path_lowerSTRINGThe full path to the file in lowercase, as stored in the user's Dropbox.
path_displaySTRINGThe display-friendly version of the file's path, preserving original casing for readability.
idSTRINGID of the file within Dropbox.
sizeINTEGERThe size of the file in bytes, representing the total amount of data it contains.
is_downloadableBOOLEAN
Options true, false
Indicates whether the file can be directly downloaded from Dropbox.
content_hashSTRINGA hash value representing the content of the file, used for verifying data integrity.

Output Example

{
  "name" : "",
  "path_lower" : "",
  "path_display" : "",
  "id" : "",
  "size" : 1,
  "is_downloadable" : false,
  "content_hash" : ""
}

Find Folder Path

To find the folder path, click here.

Delete File

Name: deleteFile

Delete the file at a given path.

Properties

NameLabelTypeDescriptionRequired
pathPathSTRINGPath of the file to be deleted.true

Example JSON Structure

{
  "label" : "Delete File",
  "name" : "deleteFile",
  "parameters" : {
    "path" : ""
  },
  "type" : "dropbox/v1/deleteFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the deleted file.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find File Path

To find the file path, click here.

Delete Folder

Name: deleteFolder

Delete the folder at a given path. All its contents will be deleted too.

Properties

NameLabelTypeDescriptionRequired
pathPathSTRINGPath of the folder to be deleted.true

Example JSON Structure

{
  "label" : "Delete Folder",
  "name" : "deleteFolder",
  "parameters" : {
    "path" : ""
  },
  "type" : "dropbox/v1/deleteFolder"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the deleted folder.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find Folder Path

To find the folder path, click here.

Download File

Name: downloadFile

Download a file from Dropbox.

Properties

NameLabelTypeDescriptionRequired
pathFile PathSTRINGThe path of the file to download.true

Example JSON Structure

{
  "label" : "Download File",
  "name" : "downloadFile",
  "parameters" : {
    "path" : ""
  },
  "type" : "dropbox/v1/downloadFile"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

Find File Path

To find the file path, click here.

Name: getFileLink

Get a temporary link to stream content of a file. This link will expire in four hours and afterwards you will get 410 Gone. This URL should not be used to display content directly in the browser. The Content-Type of the link is determined automatically by the file's mime type.

Properties

NameLabelTypeDescriptionRequired
pathFile PathSTRINGThe path to the file you want a temporary link to.true

Example JSON Structure

{
  "label" : "Get File Link",
  "name" : "getFileLink",
  "parameters" : {
    "path" : ""
  },
  "type" : "dropbox/v1/getFileLink"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
linkSTRINGA temporary URL that can be used to stream the content of the file. This link expires after four hours.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  },
  "link" : ""
}

Find File Path

To find the file path, click here.

List Folder

Name: listFolder

List the contents of a folder.

Properties

NameLabelTypeDescriptionRequired
pathPathSTRINGThe path of the folder to be listed. Inputting nothing searches root.false

Example JSON Structure

{
  "label" : "List Folder",
  "name" : "listFolder",
  "parameters" : {
    "path" : ""
  },
  "type" : "dropbox/v1/listFolder"
}

Output

Type: OBJECT

Properties

NameTypeDescription
entriesARRAY
Items [{STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}]

Output Example

{
  "entries" : [ {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  } ]
}

Find Folder Path

To find the folder path, click here.

Move File

Name: moveFile

Move a file to a different location in the user's Dropbox.

Properties

NameLabelTypeDescriptionRequired
from_pathSource PathSTRINGPath of the file in the user's Dropbox to be moved.true
to_pathDestination PathSTRINGPath in the user's Dropbox that is the destination.true
autorenameAuto RenameBOOLEAN
Options true, false
If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict.false

Example JSON Structure

{
  "label" : "Move File",
  "name" : "moveFile",
  "parameters" : {
    "from_path" : "",
    "to_path" : "",
    "autorename" : false
  },
  "type" : "dropbox/v1/moveFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the moved file.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find File Path

To find the file path, click here.

Move Folder

Name: moveFolder

Move a folder to a different location in the user's Dropbox. All content of the folder will be moved.

Properties

NameLabelTypeDescriptionRequired
from_pathSource PathSTRINGPath in the user's Dropbox to be moved.true
to_pathDestination PathSTRINGPath in the user's Dropbox that is the destination.true
autorenameAuto RenameBOOLEAN
Options true, false
If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.false

Example JSON Structure

{
  "label" : "Move Folder",
  "name" : "moveFolder",
  "parameters" : {
    "from_path" : "",
    "to_path" : "",
    "autorename" : false
  },
  "type" : "dropbox/v1/moveFolder"
}

Output

Type: OBJECT

Properties

NameTypeDescription
metadataOBJECT
Properties {STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}
Metadata containing details about the moved folder.

Output Example

{
  "metadata" : {
    "name" : "",
    "path_lower" : "",
    "path_display" : "",
    "id" : ""
  }
}

Find Folder Path

To find the folder path, click here.

Name: search

Searches for files and folders. Can only be used to retrieve a maximum of 10,000 matches. Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.

Properties

NameLabelTypeDescriptionRequired
querySearch StringSTRINGThe string to search for. May match across multiple fields based on the request arguments.true

Example JSON Structure

{
  "label" : "Search",
  "name" : "search",
  "parameters" : {
    "query" : ""
  },
  "type" : "dropbox/v1/search"
}

Output

Type: OBJECT

Properties

NameTypeDescription
matchesARRAY
Items [{{STRING(name), STRING(path_lower), STRING(path_display), STRING(id)}(metadata)}]
A list (possibly empty) of matches for the query.

Output Example

{
  "matches" : [ {
    "metadata" : {
      "name" : "",
      "path_lower" : "",
      "path_display" : "",
      "id" : ""
    }
  } ]
}

Upload File

Name: uploadFile

Create a new file up to a size of 150MB with the contents provided in the request.

Properties

NameLabelTypeDescriptionRequired
fileEntryFile EntryFILE_ENTRYThe object property which contains a reference to the file to be written.true
pathDestination PathSTRINGThe path to which the file should be written.true
filenameFilenameSTRINGName of the file. Needs to have the appropriate extension.true
autorenameAuto RenameBOOLEAN
Options true, false
If there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.false
muteMuteBOOLEAN
Options true, false
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 a user notification.false
strict_conflictStrict ConflictBOOLEAN
Options true, false
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 the existing file has been deleted.false

Example JSON Structure

{
  "label" : "Upload File",
  "name" : "uploadFile",
  "parameters" : {
    "fileEntry" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "path" : "",
    "filename" : "",
    "autorename" : false,
    "mute" : false,
    "strict_conflict" : false
  },
  "type" : "dropbox/v1/uploadFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
nameSTRINGName of the file. The last component of the path (including extension).
path_lowerSTRINGThe lowercased full path in the user's Dropbox.
path_displaySTRINGThe cased path to be used for display purposes only.
idSTRINGID of the folder.
sizeINTEGERThe file size in bytes.
is_downloadableBOOLEAN
Options true, false
If file can be downloaded directly.
content_hashSTRINGA hash of the file content.

Output Example

{
  "name" : "",
  "path_lower" : "",
  "path_display" : "",
  "id" : "",
  "size" : 1,
  "is_downloadable" : false,
  "content_hash" : ""
}

Find Folder Path

To find the folder path, click here.

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find File or Folder path

Finding the source path of a file or folder in Dropbox depends on whether you are using the desktop application, the website, or the API. The source path is generally the path relative to the root of your Dropbox folder (e.g., /Photos/vacation.jpg).

The path of the file or folder can be found in the output of the following actions. In the output, you will find a path_lower property, which represents the path of the file or folder in lowercase letters.

  • Copy File
  • Copy Folder
  • Create Folder
  • Create New Paper File
  • Delete File
  • Delete Folder
  • Get File Link
  • List Folder
  • Move File
  • Move Folder
  • Search
  • Upload File

How is this guide?

Last updated on

On this page