What if every time you dropped a COA into a Google Drive folder, the information was automatically extracted and added to a spreadsheet?
No programming, no additional software and no manually entering laboratory results. Using Google Workspace Studio and Gemini, you can build a basic automated COA library in a matter of minutes.
All you need is Google Drive, Google Sheets and access to Google Workspace Studio.
Step 1. Create a COA Folder
Start by creating a folder in Google Drive called COA Library. This is where you'll store your laboratory reports and where our automation will look for new documents.
Any individual COA added to this folder will be eligible for processing once the automation is enabled.
Step 2. Create Your Database
Create a Google Sheets workbook titled COA Library. In the first row, add the following column headers:
Google Drive Link
Sample ID
Date Received
Business Name
Strain Name
Batch Number
Product Type
Total THC
Total Cannabinoids
Top Terpene 1
Top Terpene 2
Top Terpene 3
These are the data points we'll be extracting from each laboratory report. You can add or remove fields depending on what information is relevant to your operation.
Step 3. Create Your Flow
Navigate to Google Workspace Studio and create a new flow. The entire automation consists of three steps: a starter, an extraction and a spreadsheet action.
Starter — When an Item Is Added to a Folder
Select When an item is added to a folder as your starter and designate the COA Library folder you created earlier.
This tells Workspace Studio to initiate the automation whenever a new document is added to that folder.
Insert screenshot: Starter configuration.
Extract — Put Gemini to Work
Add an Extract step. For the source content, select the Link to item variable from the starter.
Next, create extraction fields corresponding to the column headers in your spreadsheet. Give Gemini a brief description of what each field represents so it knows exactly what to look for.
For example:
Total THC: The reported total THC percentage, not the individual THCA or Delta-9 THC concentrations.
Batch Number: The 16-digit batch identifier. Preserve all leading zeros.
Top Terpene 1: The terpene with the highest reported concentration.
Top Terpene 2: The terpene with the second-highest reported concentration.
Top Terpene 3: The terpene with the third-highest reported concentration.
Instruct Gemini to leave fields blank when information is unavailable rather than estimating or generating missing values.
Insert screenshot: Extract step configuration.
Google Sheets — Add a Row
For the final step, select Add a Row and designate your COA Library spreadsheet as the destination.
Map each extracted variable to its corresponding column in the spreadsheet. For the Google Drive Link, use the link provided by the starter.
Set the row placement to After the last data row.
Insert screenshot: Google Sheets action and variable mapping.
Step 4. Test Your Automation
Enable your flow and upload a COA into your Google Drive folder. Once the flow finishes processing, open your spreadsheet and compare the extracted information against the original laboratory report.
That's it. You now have an automated COA library without writing a single line of code.
What's Next?
The beauty of this process isn't just that you've automated data entry. It's that you're now building a structured product database simply by uploading documents.
That information can eventually be used for inventory management, product labeling, menus, reporting and budtender education. You can even connect the spreadsheet to AppSheet and build your own searchable COA library.
But that's another article for another day.
For now, you've eliminated a tedious administrative task using three applications you may already be paying for.