Automating with Flow and Agentforce
Before you start
Thirteen invocable actions ship with the package, available in Flow Builder under the Dropbox action category. The same thirteen are available as Agentforce agent actions. They are the same actions, not two sets.
Each action runs as the user executing the Flow or agent, using that user's own Dropbox connection. Before any action will succeed:
- The running user needs the Dropbox Standard or Dropbox Admin permission set.
- The running user must have connected their own Dropbox account.
- The org must have completed workspace setup.
If any of these are missing the action returns success = false with an explanatory message. Start with Check Dropbox Connection if you want to fail gracefully.
Three of these actions are the only route to their functionality. Move, copy and item-level rename have no equivalent in the Dropbox File Manager, so Flow is how you expose them.
Adding an action to a Flow
- In Flow Builder, add an Action element.
- Set the category filter to Dropbox.
- Choose the action.
- Map your inputs. For record-scoped actions, pass the record ID from a Flow variable or $Record.Id.
- Store the outputs in variables if you need to branch on the result.
Common conventions
| Field | Meaning |
|---|---|
| recordId | The Salesforce record whose Dropbox folder the action targets. Works with any object that has a Name field. |
| subPath / destSubPath | Optional subfolder inside the record folder. Blank means the folder root. |
| success | True when the action completed. Check this before using other outputs. |
| message | Human readable result or error detail. |
Two actions break these conventions. Check Dropbox Connection has no success output, use isConnected. List Files for Record reports failures in errorMessage, not message.
Action reference
Check Dropbox Connection
Confirms the running user has a working connection and returns the account details.
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| placeholder | Text | No | Not used. Leave empty. Present only because Flow requires at least one input. |
Outputs
| Field | Type | Notes |
|---|---|---|
| isConnected | Boolean | Use this instead of success. There is no success output. |
| accountEmail | Text | Email on the connected Dropbox account. |
| accountName | Text | Display name on the connected account. |
| message | Text | Result detail. |
Create Folder for Record
Creates one or more folders under the record's folder. Also the way to guarantee the record folder exists before other actions run.
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | |
| folderName | Text | No | Folder path or paths. Separate siblings with a semicolon or comma. Use a forward slash to nest. Blank creates or confirms only the record root folder. |
| parentPath | Text | No | Optional parent folder beneath which the names are created. |
A folderName value of finance/reporting;marketing;legal/myfolder/subfolder/other;operations creates four top-level folders, two with nested subfolders.
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| folderPath | Text | Full Dropbox path of the created folder. |
| folderId | Text | Dropbox folder identifier. |
| subfoldersCreated | Number | Sibling entries created or already present. |
| message | Text |
Limitation: folder names containing a comma or semicolon are not supported, because those are the sibling separators.
Upload File to Record
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | |
| fileName | Text | Yes | Name in Dropbox, including extension. |
| fileContent | Text | Yes | Base64 encoded content. |
| subPath | Text | No | Optional subfolder. |
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| filePath | Text | Full Dropbox path of the uploaded file. |
| fileId | Text | Dropbox file identifier. |
| message | Text |
Content passes as base64 inside the Flow transaction, so this suits small and moderate files. The 150 MB chunked upload path exists only in the file manager component.
List Files for Record
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | |
| subPath | Text | No | Optional subfolder to list instead of the root. |
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| filesJson | Text | JSON array. Each entry has the keys id, name, path, isFolder, size, modified. |
| fileCount | Number | Entries returned. |
| folderPath | Text | Path that was listed. |
| errorMessage | Text | This action uses errorMessage, not message. |
Delete File from Record
A real Dropbox delete. Treat accordingly.
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | |
| filePath | Text | Yes | Path or Dropbox ID of the file. |
Outputs: success, message.
Rename File or Folder for Record
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | |
| currentName | Text | Yes | Current name of the item. |
| newName | Text | Yes | New name. |
Outputs: success, newName, message.
This renames an item inside the folder. Renaming the record's root folder is done from the file manager instead.
Move File or Folder to Record Folder
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | The destination record. |
| itemName | Text | Yes | Item to move. |
| destSubPath | Text | No | Optional subfolder in the destination. |
| sourceRecordId | Record ID | No | Record moved from. Defaults to the destination record. |
Outputs: success, itemName, message.
Copy File or Folder to Record Folder
Same shape as Move, but leaves the source in place.
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| recordId | Record ID | Yes | The destination record. |
| itemName | Text | Yes | Item to copy. |
| destSubPath | Text | No | Optional subfolder in the destination. |
| sourceRecordId | Record ID | No | Record copied from. Defaults to the destination record. |
Outputs: success, itemName, message.
Get Shareable Link
Inputs: recordId (required), filePath (required, path or Dropbox ID).
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| shareUrl | Text | Public shareable link. Does not expire. |
| message | Text |
Get Temporary Download Link
Inputs: recordId (required), filePath (required).
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| downloadUrl | Text | Direct download URL, valid for 4 hours. Do not store it on a record for later use. |
| message | Text |
Get Folder Share Link
Inputs: recordId (required).
Outputs: success, folderUrl, message.
Search Files in Dropbox
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
| query | Text | Yes | Text to search for. |
| searchPath | Text | No | Optional folder path to limit scope. |
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| resultsJson | Text | JSON array. Keys: id, name, path, isFolder. |
| resultCount | Number | Matches found. |
| message | Text |
Not scoped to a record. It searches the connected user's whole Dropbox, so results can include files outside the Salesforce workspace unless you set searchPath.
Get Dropbox Storage Usage
Inputs: placeholder (not used, leave empty).
Outputs
| Field | Type | Notes |
|---|---|---|
| success | Boolean | |
| usedBytes | Number | Space used in bytes. |
| totalBytes | Number | Total allocation in bytes. |
| usedFormatted | Text | Human readable used space. |
| totalFormatted | Text | Human readable total. |
| percentUsed | Number | Percentage consumed. |
| message | Text |
Using the same actions with Agentforce
Every action above is available as an agent action. Grouped by intent:
| Purpose | Actions |
|---|---|
| Find | Search Files in Dropbox, List Files for Record |
| Retrieve | Get Shareable Link, Get Temporary Download Link, Get Folder Share Link |
| Add | Upload File to Record, Create Folder for Record |
| Organise | Move, Copy, Rename |
| Remove | Delete File from Record |
| Check state | Check Dropbox Connection, Get Dropbox Storage Usage |
Requests an agent can handle well: find the signed contract for Acme Corp and send me a link; create Contracts and Invoices folders on this Opportunity; what files do we have on this Case; copy the proposal from the Account folder into this Opportunity; how much Dropbox storage are we using.
The pattern that works is search plus act. Find the file, then produce a link to it. These actions do not read file contents, so do not ask an agent to reason about what is inside a document.
Setting it up
- In Agent Builder, open or create the topic, for example Document Management.
- Add the actions you want.
- Write topic instructions describing when each applies. The packaged action descriptions are a starting point, not a substitute.
- Test with realistic phrasing, including requests that should not trigger a Dropbox action.
Be selective. Adding all thirteen to one topic makes action selection less reliable. Group by intent and leave out the destructive ones unless you need them.
Agent-specific cautions
Delete is irreversible from Salesforce. If you give an agent the delete action, require explicit confirmation in the topic instructions, and accept that the confirmation is only as reliable as the model's adherence to them. Most customers are better served leaving it out.
Share links do not expire. If an agent hands one out, it keeps working. For anything sensitive prefer the temporary link.
Search is unscoped. An agent asked a broad question may surface files from outside the workspace. Constrain searchPath where the topic allows.
The connection constraint decides everything. There is no org-level service connection. An employee-facing agent running as the user works naturally. An autonomous or scheduled agent running as an integration user requires that user to have connected a Dropbox account of their own, and realistically requires a Team Folder workspace so that connection can see the team's files. Start any Dropbox topic with Check Dropbox Connection so the agent can tell the user to connect rather than reporting an opaque failure.
Things to watch for
- Check Dropbox Connection has no success output. Branch on isConnected.
- List Files for Record uses errorMessage. The other twelve use message. Uniform error handling will silently miss list failures.
- Placeholder inputs on Check Connection and Get Storage are unused. Leave them blank.
- Temporary links expire after 4 hours. Use Get Shareable Link for anything durable.
- Move, Copy and Rename are Flow-only. No file list equivalent.
- Actions run as the current user. A Flow in system context still needs the running user's Dropbox connection. Scheduled and automated Flows fail if the automation user has never connected.
Worked example: file a signed contract on Opportunity close
- Record-triggered Flow on Opportunity, condition StageName equals Closed Won.
- Check Dropbox Connection. If isConnected is false, create a task for the owner and exit.
- Create Folder for Record with folderName set to Contracts;Invoices.
- Copy File or Folder to Record Folder with sourceRecordId set to the related Account and destSubPath set to Contracts.
- Get Folder Share Link and write folderUrl to a URL field on the Opportunity.

