# Dropbox

> Upload, download, and organize content in Dropbox.

App · File Storage · 5 actions · 1 trigger. Web page: https://docs.lodol.com/docs/integrations/dropbox

## Triggers

Start a workflow when something happens in Dropbox. See [how triggers work](https://docs.lodol.com/docs/concepts/triggers.md).

### Dropbox New File

Triggers when a new file is added to Dropbox

**Filters**: Narrow which events start a run.

- `folder_path`
- `name_pattern`

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `id` (text)
- `name` (text)
- `path_display` (text)
- `path_lower` (text)

## Actions

### Create Dropbox folder

Create a new folder in Dropbox.

**Inputs**

- Folder path (`folder_path`, text, required): The path for the new folder (e.g., /Documents/NewFolder).
- Rename automatically (`autorename`, true/false): Automatically rename if a folder with the same name exists. Default: `false`.

**Outputs**: Response envelope; the payload is in the "path" field.

- `path` (text): The display path of the created folder.
- `status` (text)

**Example output**

```json
{
  "path": "/Documents/NewFolder",
  "status": "success"
}
```

### Delete Dropbox file or folder

Delete a file or folder from Dropbox.

**Inputs**

- File or folder path (`target_path`, text, required): The path of the file or folder to delete, for example /folder/file.txt.

**Outputs**: Response envelope; the payload is in the "deleted" field.

- `deleted` (true/false): True if the deletion was successful.
- `status` (text)

**Example output**

```json
{
  "deleted": true,
  "status": "success"
}
```

### Download file from Dropbox

Download a file from Dropbox and save it to a location you choose.

**Inputs**

- Dropbox path (`dropbox_path`, text, required): The Dropbox path of the file to download.
- Destination path (`destination_path`, text): Where to save the downloaded file. If left blank, a temporary folder is used.

**Outputs**: Response envelope; the payload is in the "path" field.

- `path` (text): The local path where the file was saved.
- `status` (text)

**Example output**

```json
{
  "path": "/tmp/downloaded_file.txt",
  "status": "success"
}
```

### List Dropbox folder contents

List the contents of a Dropbox folder.

**Inputs**

- Folder path (`folder_path`, text): The Dropbox folder to list. Leave blank for the top level of your Dropbox.
- Include subfolders (`recursive`, true/false): Set to true to also include files inside subfolders. Default: `false`.
- Limit (`limit`, number): Maximum number of items to return (default 200).

**Outputs**: Response envelope; the payload is in the "entries" field.

- `entries` (list): List of file and folder paths in the directory.
- `status` (text)

**Example output**

```json
{
  "entries": [
    "/Documents/file1.txt",
    "/Documents/file2.pdf",
    "/Documents/Subfolder"
  ],
  "status": "success"
}
```

### Upload file to Dropbox

Upload a file to Dropbox at the location you choose.

**Inputs**

- File to upload (`file_path`, text, required): The file to upload to Dropbox.
- Dropbox path (`dropbox_path`, text, required): The destination path in Dropbox (e.g., /folder/file.txt).
- Rename automatically (`autorename`, true/false): Automatically rename the file if one with the same name already exists. Default: `true`.

**Outputs**: Response envelope; the payload is in the "path" field.

- `path` (text): The display path of the uploaded file in Dropbox.
- `status` (text)

**Example output**

```json
{
  "path": "/Documents/uploaded_file.txt",
  "status": "success"
}
```
