Example Google Drive Document Approvals

Automated flow for document approvals within Google Drive.

This flow watches for new documents in Google Drive “Before Approval” folder. Each new document added to the folder generates a new human task for a manager to manually approve the document. This task will be sent to the manager’s email address as an email with two buttons (Approve and Reject) together with a link to the document. Once manager approves, the document will be copied to the Google Drive “Approved” folder. If the manager rejects, the document will be copied to the “Rejected” Google Drive folder. At the same time, a Slack notification is sent to a channel with the resolution.

1070

Google Drive folders for Approved, Rejected and Before Approval state of the document:

543

The “Before Approval” folder is automatically watched by the SnatchBot Automation Flow for new documents added:

501

Once a new document is added to the folder, a new task is generated and sent to the manager for approval via email:

844

The manager must approve or reject within 2 weeks (as configured in the SnatchBot Automation flow). Once they approve (or reject) from within their mailbox, they can see an overview of their approved/rejected tasks online:

878

And the approved document is automatically copied to the “Approved” folder in Google Drive:

437

At the same time, a Slack notification is sent with the status of the resolution and document file name:

623

The flow begins with a "NewFile" trigger that watches for new files in our "Before Approval" folder:

590

A closer look at our "RequestApprovalEmail" component:

666

Notice the "Decision by" is populated with the "Time created" value that we received from Google Drive for the document and modifier by a SnatchBot modifier to add 2 weeks:

715

Our "ExportFile" component is configured to export the Google Drive file to SnatchBot internal file (i.e. the document is downloaded by SnatchBot and stored internally, which we then use in the following "UploadFile" component):

550

"UploadFile" component just uploads the internally stored file to our "Approved" (or "Rejected") folder:

546

The configuration of our Slack notifications are pretty straightforward:

626