51黑料不打烊

Dropbox modules

In an 51黑料不打烊 Workfront Fusion scenario, you can automate workflows that use Dropbox or Dropbox Business, as well as connect it to multiple third-party applications and services.This allows you to automate activities such as monitoring, searching, retrieving, listing, creating, and editing files and folders in your Dropbox.

For instructions on creating a scenario, see the articles under Create scenarios: article index.

For information about modules, see the articles under Modules: article index.

Access requirements

Expand to view access requirements for the functionality in this article.

You must have the following access to use the functionality in this article:

table 0-row-2 1-row-2 2-row-2 3-row-2 layout-auto html-authored no-header
51黑料不打烊 Workfront package Any
51黑料不打烊 Workfront license

New: Standard

Or

Current: Work or higher

51黑料不打烊 Workfront Fusion license**

Current: No Workfront Fusion license requirement.

Or

Legacy: Workfront Fusion for Work Automation and Integration

Product

New:

  • Select or Prime Workfront package: Your organization must purchase 51黑料不打烊 Workfront Fusion.
  • Ultimate Workfront package: Workfront Fusion is included.

Or

Current: Your organization must purchase 51黑料不打烊 Workfront Fusion.

For more detail about the information in this table, see Access requirements in documentation.

For information on 51黑料不打烊 Workfront Fusion licenses, see 51黑料不打烊 Workfront Fusion licenses.

Prerequisites

  • To use Dropbox modules, you must have a Dropbox account.
IMPORTANT
Dropbox must approve applications with more than 50 users.
For more information, search for 鈥淧roduction approval鈥 in the Dropbox developer guide.

Dropbox API information

The Dropbox connector uses the following:

Base URL
https://api.dropboxapi.com/2
API version
2
API tag
  • Dropbox

    v5.3.9

  • Dropbox Business

    v1.0.12

Create a connection to Dropbox

To create a connection for your Dropbox modules:

  1. Click Add next to the Connection box.

  2. Fill in the following fields:

    table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 layout-auto html-authored no-header
    Connection name Enter a name for this connection.
    Environment Select whether this connection is for a production or non-production environment.
    Type Select whether you are connecting to a service account or a personal account.
    Client ID Enter your Dropbox Client ID.
    Client Secret Enter your Dropbox Client Secret.
    Account Type Select whether you are connecting to a personal Dropbox account or a business (Dropbox Business) account.
    Exclude dropbox-api-path-root header Enable this option to exclude dropbox-api-path-root header for Dropbox Apps with App Folder access
  3. Click Continue to save the connection and return to the module.## Dropbox modules and their fields

Dropbox modules and their fields

When you configure Dropbox modules, Workfront Fusion displays the fields listed below. Along with these, additional Dropbox fields might display, depending on factors such as your access level in the app or service. A bolded title in a module indicates a required field.

If you see the map button above a field or function, you can use it to set variables and functions for that field. For more information, see Map information from one module to another.

Map toggle

Trigger modules

Watch Files

This Trigger type module returns file details when the file in a specified folder is modified.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Folder
Select the folder you want to watch for changes.
Watch also subfolders
Enable this option to also monitor subfolders in the selected folder for modified files.
Limit
Enter or map the maximum number of records you want the module to return during each scenario execution cycle.

Modules for getting Dropbox files and folders

Download a File

This action module downloads a file from a folder.

You specify the file and its location.

The module returns the ID of the file and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

NOTE
This module is useful for providing files to subsequent modules.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files
Select whether you want to map the file path or select the file manually.
File Path / File

File Path

Enter or map the target path to the file.

File

Select the file from the menu.

Get a Folder Metadata

This action module retrieves shared folder details.

You specify the ID of the folder.

The module returns the ID of the folder and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Shared Folder ID
Enter or map the ID of the folder you want to retrieve details about.

List All Files/Subfolders in a Folder

This action module lists files or folders in a particular folder.

You specify the ID of the folder.

The module returns the IDs of the files or foldes and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
List
Select whether you want to retrieve files or folders.
Show Only Downloadable Files
Enable this option to return only downloadable files. Some types of files, such as Google Docs, are not downloadable.
Folder
Enter or map the folder you want to retrieve files or folders from.
Limit
Enter or map the maximum number of records you want the module to list during each scenario execution cycle.

List File Revisions

This action module retrieves all file revisions (a version history) of a particular file.
You specify the ID of the file.

The module returns any standard fields associated with the record, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files
Select whether you want to map the file path or select the file manually.
File Path / File

File Path

Enter or map the target path to the file.

File

Select the file from the menu.

Limit
Enter or map the maximum number of records you want the module to list during each scenario execution cycle.

Search Files/Folders

This search module looks for records in an object in Dropbox that match the search query you specify.

You can map this information in subsequent modules in the scenario.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Search
Enter the search term.
Folder
Select the folder you want to search. This module searches the entire Dropboxaccount if you do not select a folder.
File Status
Select the file status That you want to include in the search.
File Categories
Select the file categories that you want to include in the search.
File extensions
For each file extension that you want to include in the search, click Add item and enter or map the file extension.
Limit
Enter or map the maximum number of records you want the module to return during each scenario execution cycle.

Modules for creating and editing Dropbox files and folders

Create a Folder

This action module creates a new folder.

You specify the path and a name for the folder.

The module returns the ID of the folder and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Folder Name
Enter the name for the new folder.
Folder

Enter or map the path where you want to create a new folder.

Note:

If you are using a Dropbox Business account (with team spaces), you must remove the slash /, or do not click Click here to choose folder to create a team folder in the root.

If the slash is not removed an error [409] path/malformed_path/.. is returned.

Auto rename
Enable this option to rename the new folder, if a folder with the same name already exists in the target location.

Create/Overwrite a Text File

This action module creates a DOC file, or overwrites the content of an existing one.

You specify the source file and the folder.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Select to

Select whether you want to create or overwrite a DOC file.

  • Create Select the folder where you want to create a file.

  • Overwrite

    Select how you want to choose the file to overwrite, then map the file path or select the file.

Source File

Select a source file from a previous module, or map the source file's content.

If you are creating a file, select Empty.

This action module creates a public link to a file.

You specify the file and information about the link.

The module returns the ID of the link and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files
Select whether you want to map or enter the file path, or select the file manually.
File Path / File

File Path

Enter or map the path to the target file.

File

Select the target file.

Requested Visibility

Select whether the link is public, for team, or password restricted.

Note:

Team only is available only to Dropbox Business accounts. Access with password is only available to Dropbox Pro or Dropbox Business accounts.

Link's Expiration Date
Enter the date and time when the link will expire and will be no longer accessible. If this field is left empty, the link will not expire. For a list of supported date and time formats, see Type coercion.
Link's Access Level

Set the permission for the link recipient.

  • Viewer

    Users who use the link can view and comment on the content.

  • Editor

    Users who use the link can edit, view, and comment on the content. This access level is available only for cloud-based documents.

  • Max

    Users who use the link receive the maximum access level you can set the link to.

Delete a File/Folder

This action module deletes a file or folder.

You specify the file or folder.

The module returns the ID of the record and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files
Select whether you want to map or enter the file path, or select the file manually.
File or Folder Path / File or Folder

File/Folder Path

Enter or map the target path to the file or folder.

File/Folder

Select the file or folder from the menu.

Move a File/Folder

This action module moves a file or folder to a different location.

You specify the file or folder and how and where you ant to move it.

The module returns the ID of the file or folder and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files / folders
Select whether you want to map or enter the file or folder path, or select the file or folder manually.
File / Folder Path /

File/Folder Path

Enter or map the target path to the file or folder.

File/Folder

Select whether you are moving a file or folder, then the file or folder.

To Folder
Enter or map the target location for the file or folder.
New Name
Enter the new name for the file or folder in the new location.
Auto Rename
Enable this option to ensure that if a file or folder with the same name exists, the module renames the new file or folder by adding (NUMBER) after the file or folder name. Otherwise the file or folder in the target location is overwritten.
Allow ownership transfer
Enable this option to allow moves by owner, even if it would result in an ownership transfer for the content being moved.

Rename a File/Folder

This action module renames a file or folder.

You specify the file or folder and the new name.

The module returns the ID of the file or folder and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files
Select whether you want to map or enter the file path, or select the file manually.
File/Folder Path / File/Folder

File/Folder Path

Enter or map the target path to the file or folder.

File/Folder

Select whether you are moving a file or folder, then the file or folder.

Rename
Enter the new name for the file, including the file extension.

Restore a File

This action module restores a previous version of a file.

You specify the file and the number of the revision you want.

The module returns the ID of the version and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Way of selecting files
Select whether you want to map or enter the file path, or select the file manually.
File Path / File

File Path

Enter or map the target path to the file.

File

Select the file from the menu.

Revision
Enter or map the revision number of the revision you want to restore.

Upload a File

This action module uploads a file to a folder.

You specify information such as the location for the file, the file you want to upload, and an optional new name for the file.

The module returns the ID of the file and any associated fields, along with any custom fields and values that the connection accesses. You can map this information in subsequent modules in the scenario.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
Folder
Select the folder of your Dropbox you want to upload the file to.
Source File

Select a source file from a previous module, or map the source file's name and data.

Note:

The maximum size of the uploaded file is 150 MB.

Overwrite an existing file
Enable this option to replace the existing file with the new file. If this option is left disabled, the uploaded file is renamed.

Other modules

Make an API Call

This action module lets you make a custom authenticated call to the Dropbox API. This way, you can create a data flow automation that can鈥檛 be accomplished by the other Dropbox modules.

When you are configuring this module, the following fields display.

Connection
For instructions about connecting your Dropbox account to Workfront Fusion, see Create a connection to Dropbox in this article.
URL
Enter a path relative to Enter a path relative to https://api.dropboxapi.com. For example, /2/files/list_folder
Method
Select the HTTP request method you need to configure the API call. For more information, see HTTP request methods.
Headers
Enter the desired request headers. Workfront Fusion adds authorization headers automatically.
Query String
Enter the request query string.
Body

Add the body content for the API call in the form of a standard JSON object.

Note:

When using conditional statements such as if in your JSON, put the quotation marks outside of the conditional statement.

recommendation-more-help

Example:

The following API call returns the first 10 files from the /Text files folder in your Dropbox account:

URL: /2/files/list_folder

Body:

{
"path": "/Text files",
"limit": 10,
"recursive": false,
"include_deleted": false
}

Matches of the search can be found in the module鈥檚 Output under Bundle > Body > entries.

In our example, 10 tickets were returned.

Common problems

Unable to upload or update a file

The following may be reasons that uploading or updating a file fails:

  • The uploaded file is too big and exceeds the maximum file size allowed for your Dropbox plan, or you have used all of your Dropbox account鈥檚 storage quota. You must delete existing files from your Dropbox account or upgrade your plan.
  • The previously selected folder, to which the file is being uploaded to, no longer exists. The scenario stops and you must select the target folder again.

The URL returned by the Dropbox >Create a shared link does not link directly to an image, but to a Dropbox page. To force the image to download, replace the trailing ?dl=0 with ?dl=1. To force the image to render (for example, in a Web browser or in Facebook Messenger), append &raw=1 to the URL.

If you need to get the direct or raw link of your image for your website or for other Workfront Fusion modules, you must modify the initial shared URL in the following way:

Original URL:

https://www.dropbox.com/s/ia8qtvs20f3a5ux/Screen%20Shot%202018-10-15%20at%204.21.11%20PM.png?dl=0

  1. Replace www with dl.
  2. Remove ?dl=0.

Final URL:

https://dl.dropbox.com/s/ia8qtvs20f3a5ux/Screen%20Shot%202018-10-15%20at%204.21.11%20PM.png

To automatically modify the URL, you can use the replace() function twice:

  • Replace www with dl

    Replace www with dl

  • And to remove ?dl=0

    Remove DL

To do it in one step, combine these functions:

Replace both

You can also copy it and paste it into the field. Replace 1.url with the URL.

{{replace(replace(1.url; "?dl=0"; ""); "www"; "dl")}}
7e1891ad-4d59-4355-88ab-a2e62ed7d1a3