Links

Dropbox

Know the component and how to use it.
The Dropbox component allows a connection with the Dropbox service to be established, on top of enabling the following operations with files: Download, Upload and Delete.
Take a look at the configuration parameters of the component:
  • Account: account for the component to make the service authentication. It’s necessary to use an OAUTH-BEARER account type. To know more about the Dropbox credentials, click here.
  • Operation: operation to be executed, which can be Download, Upload or Delete.
  • File Name: name of the file or (full file path) for the local file, applicable only in the Download and Upload operations.
  • Remote File Name: name of the remote file or relative path (eg.: tmp/file.txt) for the remote file.
  • Remote Directory: Dropbox remote directory in which the selected operation will take place.
  • Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

Messages flow

Input

The component expects the following mandatory fields to be filled:
  • Account, File Name, Remote File Name and Remote Directory
Besides, it’s possible to provide the parameters (except to Account and Operation) related to the file inside the integration flow. In this case, the component expects a message in the following format:
{
"filename": "data.csv",
"remoteFileName": "data.csv,
"remoteDirectory": "/"
}

Output

When executing the component, the following JSON structure will be generated when the action is successfully completed:
{
"fileName": "data.csv",
"remoteDirectory": "/",
"remoteFileName": "data.csv",
"success": true
}
If an error occurs during the operation execution, the following JSON structure will be generated:
{
"error": {"exception": "<ERROR DETAILS>",
"message": "<ERROR MESSAGE>",
"success": false
},
"success": false
}
IMPORTANT: the files manipulation inside a pipeline occurs in a protected way. All the files can be accessed with a temporary directory only, where each pipeline key gives access to its own files set.

Dropbox in Action

UPLOAD of a file

Input

Local file: data.csv
Parameters:
- Account: dropbox-test
- Operation: Upload
- File Name: data.csv
- Remote File Name: data.csv
- Remote Directory: /Public
or
- Account: dropbox-test (via component configuration screen)
- Operation: Upload (via component configuration screen)
- Payload:
{
"fileName": "data.csv",
"remoteFileName": "data.csv",
"remoteDirectory": "/Public"
}

Output

{
"fileName": "data.csv",
"remoteDirectory": "/Public",
"remoteFileName": "data.csv",
"success": true
}

DOWNLOAD of a file

Input

Parameters:
- Account: dropbox-test
- Operation: Download
- File Name: data.csv
- Remote File Name: data.csv
- Remote Directory: /Public
or
  • Account: dropbox-test (via component configuration screen)
  • Operation: Download (via component configuration screen)
  • Payload:
{
"fileName": "data.csv",
"remoteFileName": "data.csv",
"remoteDirectory": "/Public"
}

Output

{
"fileName": "data.csv",
"remoteDirectory": "/Public",
"remoteFileName": "data.csv",
"success": true
}
The file download will be made in the pipeline local directory.

DELETE of a file

Input

Parameters
  • Account: dropbox-test
  • Operation: Delete
  • File Name: data.csv
  • Remote File Name: data.csv
  • Remote Directory: /Public
or
  • Account: dropbox-test (via component configuration screen)
  • Operation: Delete (via component configuration screen)
  • Payload:
{
"fileName": "data.csv",
"remoteFileName": "data.csv",
"remoteDirectory": "/Public"
}

Output

{
"fileName": "data.csv",
"remoteDirectory": "/Public",
"remoteFileName": "data.csv",
"success": true
}
Last modified 2mo ago