Google Drive Approval-Gated Publishing
When a file lands in a Drafts Google Drive folder, the flow starts a Teams/Outlook approval; on approval it moves the file to a Published folder (and copies to SharePoint), and on rejection moves it to a Rework folder with the reviewer's comments. Adds a governed review gate to Google Drive 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 Google Drive publishing. On a schedule it polls a Drafts folder; for each new file it starts a Teams/Outlook approval. On approval the file is moved to a Published folder and a governed copy is written to SharePoint; on rejection the file is moved to a Rework folder with the reviewer's comments. Every decision is recorded in a Dataverse ledger that also acts as the idempotency key.
Why it matters: Content shouldn't go live unreviewed. An approval gate over Drive folders enforces sign-off with a clear audit trail and a SharePoint system-of-record copy.
Build status: Built via API-first deployment. Flow ships Off (Stopped). Flow Checker: 0 errors / 0 warnings.
Use Case
A content/marketing team drafts assets in a Google Drive Drafts folder. Before anything is considered "published" it must be signed off by a reviewer. This flow turns that informal step into an enforced, audited gate without changing where the team works.
Flow Architecture
Recurrence_Poll_Drafts
RecurrenceRuns every 1 hour and lists the Drafts folder.
Init_CorrelationId
Initialize Variableguid() stamped on every ledger row and notification for tracing.
Init_DraftsFolderId ... Init_TeamsChannelId
Initialize VariableRead each env var into a variable (Drafts id, Published path, Rework path, approver email, SharePoint site, SP library path, Teams group id, Teams channel id).
Init_StatusPublished / Init_StatusRework
Initialize VariableStatus labels written to the ledger.
List_Draft_Files
Google Drive - ListFolderPoll the Drafts folder for files awaiting review.
Apply_to_each_Draft
Foreach (Sequential)Process each returned item one at a time.
Condition_Is_File
ConditionSkip sub-folders (IsFolder == false).
Check_Ledger_For_File
Microsoft Dataverse - ListRecordsLook up the file id in the ledger (dedup).
Condition_Is_New_File
ConditionOnly process files with no ledger row.
Get_Draft_File_Content
Google Drive - GetFileContentDownload the draft content for move/copy.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_GDriveDraftsFolderId | String | REPLACE_WITH_DRAFTS_FOLDER_ID | Google Drive folder id of the Drafts folder (used by ListFolder). |
| flowlibs_GDrivePublishedPath | String | /Published | Google Drive folder path approved files are written to (CreateFile). |
| flowlibs_GDriveReworkPath | String | /Rework | Google Drive folder path rejected files are written to (CreateFile). |
| flowlibs_GDrivePublishApproverEmail | String | approver@yourcompany.com | Reviewer who approves/rejects drafts. |
| flowlibs_GDrivePublishLibraryPath | String | /Published Documents | Server-relative SharePoint library folder path for the governed copy. |
| flowlibs_SharePointSiteURL | String | <configure> | SharePoint site URL for the governed copy. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for notifications. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for notifications. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Google Drive | shared_googledrive | ListFolder GetFileContent CreateFile DeleteFile |
| Approvals | shared_approvals | StartAndWaitForAnApproval |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| SharePoint | shared_sharepointonline |
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.
- Go live
- Authorize the five connections, set the env var values (real Drafts folder id, Published/Rework paths, approver email, SharePoint site + library path, Teams group/channel ids), then turn the flow On.
- Poll frequency
- Change the Recurrence_Poll_Drafts trigger interval (default every 1 hour).
- Multi-reviewer
- Switch the approval to require all or any approvals, or change approvalType.
- Watermark / transform
- Insert a step between approval and publish to stamp or convert the approved file.
- Reuse the move pattern
- The GetFileContent -> CreateFile -> DeleteFile sequence is a reusable Google Drive move idiom.
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.01Is a file (not folder)
Skip sub-folders in the Drafts listing.
EXPR.02Is new (not in ledger)
Only process files with no ledger row.
EXPR.03Ledger dedup filter
Dedup lookup by Drive file id.
EXPR.04Approved
Branch on the approval outcome.
EXPR.05Reviewer comments
Capture the reviewer's comments for the Rework branch.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.