Dropbox Approval-Gated Publishing
When a file lands in a Dropbox drafts folder, the flow starts a Teams/Outlook approval; on approval it moves the file to a published folder and creates an expiring shared link, and on rejection moves it to rework with comments. Adds a governed review gate to Dropbox publishing.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow adds a governed review gate to Dropbox publishing. When a file lands in a drafts folder, the flow starts a Basic (Approve/Reject) approval delivered through Teams and Outlook. On approval it copies the file to a published folder, removes the draft, creates an expiring shared link, and posts the outcome (with the link) to a Teams channel. On rejection it copies the file to a rework folder, removes the draft, and posts the reviewer's comments to Teams.
Why it matters: content should not go live unreviewed. An approval gate over Dropbox folders enforces sign-off, produces an audit trail, and automates the publish-or-rework move and shared-link creation - no manual file shuffling.
Ships Off (demo).
Use Case
A content/marketing/operations team drafts assets in a shared Dropbox folder and needs a reviewer's sign-off before anything is published or shared externally. Dropping a file in the drafts folder kicks off the approval; the reviewer approves or rejects from Teams or Outlook, and the file is routed to the right folder with a notification.
Flow Architecture
When a New File Is Created in Drafts
Dropbox - OnNewFileFires once per new file in the drafts folder (polling, 5 min); name/path/id from trigger headers.
Initialize Trace, Config & Paths
Initialize variableMints a correlation id, binds the drafts/published/rework folders, Dropbox token, link-expiry days, Teams ids, and approver; composes the published/rework paths and the link-expiry timestamp.
Start Approval
Approvals - StartAndWaitForAnApprovalSends an Approve/Reject approval (Basic) to the reviewer via Teams + Outlook and waits.
Check Outcome
ConditionBranches on outcome == Approve.
Approved branch
Dropbox CopyFile/DeleteFile + HTTP + TeamsCopies the file to Published, deletes the draft, creates an expiring shared link (HTTP), and posts Approved & Published with the link to Teams.
Rejected branch
Dropbox CopyFile/DeleteFile + TeamsCopies the file to Rework, deletes the draft, and posts Rejected - Sent to Rework with the reviewer comments to Teams.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_DropboxDraftsFolder | String | /FlowLibs Drafts | Folder polled for new files awaiting review. |
| flowlibs_DropboxPublishedFolder | String | /FlowLibs Published | Destination for approved files. |
| flowlibs_DropboxReworkFolder | String | /FlowLibs Rework | Destination for rejected files. |
| flowlibs_DropboxAccessToken | String | REPLACE_WITH_DROPBOX_OAUTH_TOKEN | Dropbox OAuth bearer token for the shared-link HTTP call (Key Vault in production). |
| flowlibs_ShareLinkExpiryDays | String | 14 | Days before the published file's shared link expires. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for notifications. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for notifications. |
| flowlibs_ApprovalAssignedToEmail | String | reviewer@contoso.com | Email of the reviewer who receives the approval. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Dropbox | shared_dropbox | OnNewFile CopyFile DeleteFile |
| Approvals | shared_approvals | StartAndWaitForAnApproval |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| HTTP | shared_http | POST /2/sharing/create_shared_link_with_settings |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Real-time trigger
- Swap the 5-minute poll for a Dropbox webhook (list_folder/longpoll) to publish on arrival.
- Multi-reviewer
- Change to Everyone must approve or First to respond using CreateAnApproval + WaitForAnApprovalResponse with an assignee list.
- Link policy
- Adjust the expiry days, or change the HTTP body audience/access (e.g. team + viewer); move the token to Key Vault.
- Watermark / convert
- Add a Content Conversion or Word/PDF step before publishing to stamp or convert approved files.
- Audit log
- Add a Dataverse CreateRecord after each branch to persist the decision, reviewer, comments, and correlation id.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01File metadata (trigger headers)
Draft file name (also x-ms-file-path, x-ms-file-id).
EXPR.02Approval outcome test
Branches publish vs rework.
EXPR.03Reviewer comments
Captured for the rejection notice.
EXPR.04Published path
Destination path for approved files.
EXPR.05Link expiry (RFC3339)
Expiry timestamp for the shared link.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.