Gmail logo
Google Sheets logo

Workflow template

Log matching Gmail emails in Google Sheets

Build a Google Sheets correspondence register from new Inbox emails matching a Gmail search. Each message adds its ID, sender, subject, received date and Gmail conversation URL to five prepared columns.

How it works

From a matching email to a correspondence row

1 Trigger · 1 Action
Gmail1 · Trigger

New Email Matching Search

Poll newly received Inbox messages matching subject:"[Log]". Review this query before activation; historical messages and later label changes are excluded.

Google Sheets2 · Action

Log matching email

Append one row mapped to existing A:E headers Message ID, Sender, Subject, Received and Gmail URL. RAW input keeps punctuation and formula-looking text literal.

The result

A searchable register without the email body

The prepared mapping uses five exact worksheet headers. It records a message ID and a link to its Gmail conversation, while bodies and attachments remain outside the sheet.

Fictional email with the exact first-row headers required in A:E before the action runs.
Message IDSenderSubjectReceivedGmail URL
example-enquiry-logAlex Morgan <alex@example.com>[Log] Website consultation enquiryTue, 15 Sep 2026 09:00:00 +0000https://mail.google.com/mail/u/0/#all/example-enquiry-thread

Received copies the email’s supplied date text; it is not a separately normalized UTC timestamp. The Gmail link still requires access to that mailbox.

Before activation

Set up your workflow

  1. Connect Gmail and review the Log query

    Connect the receiving mailbox and review the prefilled subject:"[Log]" search. Narrow or change it to the received Inbox messages you want in the correspondence register.

  2. Create the five worksheet headers

    Prepare Message ID, Sender, Subject, Received and Gmail URL in A:E of an existing worksheet. Connect Google Sheets, select the spreadsheet and worksheet, then review the mapped columns. Use a private destination for sender and subject details.

  3. Activate and receive a fictional matching email

    Allow the scheduled trigger to run for a new fictional message matching your query. Check the row’s ID, sender, subject and date, and open the Gmail link using the connected mailbox.

Details and limitations
  • Headers are required for this action. Create Multiple Spreadsheet Rows validates the mapped worksheet column letters and header names. An empty worksheet without headers is not ready for this template. Refresh columns and review mappings after renaming headers.

  • Append-only correspondence metadata. Historical messages and later label changes are not imported. The action does not find existing message IDs or synchronize changes. Rerunning an event can append another row, and matching new replies can add their own message rows.

  • Copied metadata and mailbox access. Bodies and attachments are not copied, but worksheet readers can see senders and subjects. RAW prevents formula interpretation. The Gmail URL points to a conversation and grants no additional mailbox access.

Questions about this template

Can I start with a completely empty worksheet?

Create the five headers first: Message ID, Sender, Subject, Received and Gmail URL in A:E. This action validates worksheet headers rather than creating them automatically.

Which email query is selected by default?

The query is subject:"[Log]". Review it before activation; the trigger handles newly received matching Inbox messages, not a historical mail export.

Does the row contain the email body or its attachments?

No. It contains message ID, sender, subject, received date text and a Gmail conversation link. Opening the link still requires access to the mailbox.

Does a repeated event update the existing message row?

No. The register is append-only and has no message-ID lookup. A rerun can append another row, while a newly received matching reply can create its own row.