Use this template

List the contents of a Dropbox folder

Overview

This workflow template uses the Dropbox API v2 to recursively retrieve all contents from a specified Dropbox root folder. By utilizing endpoints such as /files/list_folder and /files/list_folder/continue, the template efficiently gathers the contents of the folder, ensuring comprehensive access to files and directories.

Additionally, it sorts the retrieved contents alphabetically, enhancing organization and accessibility.

How the template works

  1. Initial Content Listing: Upon triggering, the workflow initiates by listing the contents of the specified Dropbox root folder using the /files/list_folder endpoint. This step retrieves the initial set of files and directories present within the root folder.

  2. Recursive Retrieval with Continuation: If the initial content listing has more results, the workflow retrieves additional results using the /files/list_folder/continue endpoint. This recursive process ensures that all contents within the root folder, regardless of the quantity, are effectively retrieved.

  3. Alphabetical Sorting: Upon retrieving all contents, the workflow sorts them alphabetically.

How to use the template

Step 1: Create Dropbox OAuth 2.0 credentials

  1. Ensure you have set up Dropbox OAuth 2.0 and have access to client ID and client secret.

  2. Log in to the SimWorkflow.

  3. Navigate to Credentials.

  4. Click Create credentials button.

  5. Select OAuth 2.0 tab.

  6. Select Dropbox from the Provider dropdown.

  7. Enter Dropbox in the Name field.

  8. Enter the Client ID in the Client ID field.

  9. Enter the Client secret in the Client secret field.

  10. Enter the following scopes in the Scopes field:

    • files.metadata.read
  11. Click Create credentials button.

Step 2: Use this workflow template

  1. Click Use this template button on the top right of this page.

  2. Click List folder task and select Configuration tab.

  3. Select Dropbox (OAuth 2.0) for Credentials field.

  4. Click List folder (more) task and select Configuration tab.

  5. Select Dropbox (OAuth 2.0) for Credentials field.

  6. Click Save button.

  7. Toggle the Enable checkbox to enable the workflow definition.