Work is rough for nearly everyone on the planet. There’s constant pressure, deadlines, shaky relationships, and all sorts of stressors. At times, you may find yourself in a scenario where you feel like you should document an interaction outside of the company email. Don’t ignore this feeling. Always trust your gut and document work emails like your life and career depend on it.

To help with this, I built a simple three-step automation using Google Workspace Studio that automatically logs Gmail messages into Google Sheets. Before we dive into the AI agent, here are a few prerequisites you’ll need (most you probably already have).

P.S. Only store non-confidential information. Don’t store things like social security numbers, PHI, or info that would be considered intellectual property.

  • Gmail account
  • Google Sheets
  • Google Workspace Account
  • Google Workspace Studio

Set Up Workspace Studio

Google Workspace email triggern

If you have access to a Google Business account then you should be able to use Google Workspace Studio. Here’s the current url: https://studio.workspace.google.com/

If it's not showing up, check your admin account and enable it. Once you’ve logged in, it’s time to put the agent to work. Start off with the first trigger.

The Starter

Select When I get an email.

Google Workspace Studio when I get an email trigger expanded

If you’re familiar with Outlook rules, you’ll be right at home here. In the From section, select the work email that was assigned to you. Next, enter any keywords into the Has the words section. Use this if you want to ensure only certain messages are sent over.

Note: This automation does not reside inside your work inbox. Thus, it cannot automatically detect a message has been received. You’ll need to forward the email from the work inbox to your gmail to kick the automation off. Unless you have a specific reason, it's generally best to leave this section blank.

Actions

Google Workspace Studio actions step

Add a row

Before you progress to this step, you’ll need to create a spreadsheet within your Google account. The columns can be as simple or complex as you need them to be, but at a bare minimum the below should be present:

  • Subject
  • Date
  • Body

Once you’ve created your spreadsheet, head back over to Workspace Studio and map it to your workflow using Spreadsheet field. Pick a sheet within the workbook (if you have multiple) and begin mapping variables from the previous step. This function is very similar to Power Automate and other automation tools.

You are essentially telling Workspace Studio to look at the email and extract various parameters, then place them into these cells in my spreadsheet.

Step 3: Notification

After the email is noticed by your agent and the data has been added to your spreadsheet, its time to let you know the work has been completed. I always use the Notify via Chat option as I’m one of the select few who prefers Google Chat to Microsoft Teams. But, you can opt to receive an email notice as well.

And, that’s it. Your work is done. Every time you forward an email from work to your personal gmail, it will be automatically routed and logged in your spreadsheet for easy reference. But, if you want to take it a step further and make your automation a little more sophisticated, I’ll show you how to add some logic to your flow.

Bonus: Step 4: Conditional logic

When you dive into the world of AI Agents, one of the worst things that can happen is an automation that fails silently. And while you may get annoyed with constant notifications of success, you’ll want the errors shouted from the rooftops. This is because automations, while powerful, can fail for a multitude of reasons. I’ve once seen a powerful automation that transported complex data across multiple systems felled by a humble password change.

For this reason, we’ll be adding a Check If statement to the flow. In this step, we’ll instruct our agent to check the value stored in the body variable from step 2. If it determines that there’s nothing in the variable, it needs to alert us via chat.

Google Workspace Studio error handling with check if statement

This is a great way to ensure you didn’t forward the wrong message over, or that the body was missing from an important message that you might need later.

Find something tedious to automate today

Automating the logging of those crucial work messages, also known as receipts, is but one of many powerful workflows you can build. Google’s ecosystem, Drive, Sheets, Pixel, and more, is designed to put AI to work for you. If you’re interested in logging your PTO, check out how I built a free PTO tracking system using nothing but Google software. And, when you’re done there, head on over to the tutorial on building a no-code case router using Power Automate.

Frequently Asked Questions

Can I forward work emails to my personal email?

Technically yes. Legally, it depends. If you aren’t forwarding sensitive information like PHI or company trade secrets then it's generally ok to retain a copy for your records.

Why should I log work emails in a spreadsheet?

Log only emails that you may need to reference later. Company IT admins have the ability to delete emails and may even be instructed to do so in the event of a potential lawsuit. Also, emails can get lost. I once saw a server migration from Rackspace to Office 365 dump thousands of emails.

What happens when Google Workspace Studio automations fail?

If automations fail, they generally do not try to re-run or fix themselves without explicit instructions. When coding we use a pattern called try/catch. This structure attempts to run a task and then catches any errors that occur so the program can respond appropriately. The equivalent of this is Workspace Studio’s Decide and Check If blocks.

Can Gmail save emails to Google Sheets?

Yes, by using tools such as Workspace Studio. Without them, Gmail is not able to save any data to Google Sheets.

Can this workflow work with Outlook emails?

Yes, the email software doesn’t matter here. So long as it's a gmail account the automation will run.

How many emails can be stored in my spreadsheet?

You are only limited by Google Sheets here. So, in theory, you can log millions of emails without issues. Though, I’d recommend archiving some older records in a separate workbook, or spreadsheet.