Garnetv1.0

Gmail Spam Check: a Daily Report of Real Mail in Spam

Why Garnet? Travelers once carried a garnet to keep them safe on the road.

Runs on: Your own Google account (Google Apps Script): nothing to install.

✨ Install with Claude's help

Not sure how to install this? Let an AI assistant walk you through it, step by step, on your own system.

  1. Copy the instructions below.
  2. Open Claude (a free account works) and paste them in.
  3. Answer its questions and follow along, doing the typing yourself.

Claude in a web browser cannot reach your computer: it reads the instructions, asks about your system, and tells you what to type and what each command does, one step at a time. You stay in control of everything that actually runs.

Using Claude Code? That is the version that runs in a terminal on your own machine, so it can do the downloading and installing itself, asking before each step. Paste this into it instead:

Open in Claude Code ↗needs the Claude Desktop app

Gmail Spam Check (Garnet): a daily report of real mail stuck in spam

Gmail's spam filter sometimes catches a client, a customer or a government notice. Garnet looks through your spam folder once a day and emails you a short report of the messages that probably don't belong there, each with a short preview and two buttons: Not spam moves it to your inbox, Really spam keeps that sender out of future reports.

A sample report: a client's email, a USPTO notice and a new trademark inquiry, each with Not spam and Really spam buttons

What it flags

It skips newsletters (anything with an unsubscribe header), sales pitches matching the pitch words, your own domains (forged mail "from" you can pass SPF) and the addresses in ignore. Your button clicks are remembered by sender: the latest click wins, and two "Really spam" clicks at the same company domain hide the whole domain.

Spam is written by strangers, so the report shows only plain text, with every link removed.

Set it up (about 5 minutes)

  1. Go to script.google.com, signed in to the Gmail account you want checked, and click New project. Name it "Spam check".
  2. Delete the sample code, paste in all of [Code.gs](Code.gs), and click Save.
  3. Edit SETTINGS at the top: your own domains, the hour you want the report, and your inquiry words (see the example below).
  4. In Project Settings (the gear), set the time zone, and tick Show "appsscript.json". Replace that file's contents with [appsscript.json](appsscript.json).
  5. Pick setup in the function menu and click Run. Google asks you to allow access to your Gmail: click your account, then Advanced → Go to Spam check (unsafe) → Allow. ("Unsafe" only means the script isn't one Google has reviewed: it's yours, running in your own account.) Your first report, covering the last 7 days, arrives a minute later.
  6. For the buttons: Deploy → New deployment, type Web app, Execute as Me, Who has access Only myself, then Deploy. Reports made after this show the buttons.

To try settings without sending anything, pick dryRun and click Run: the report appears in the execution log.

Example settings for a law office

ownDomains: ['yourfirm.com'],
trusted: ['uspto.gov', 'wipo.int', 'epo.org', 'paypal.com', 'docusign.net'],
inquiry: /\b(patents?|trademarks?|copyrights?|invention|inventor|office action|infring\w*|cease and desist|attorney|lawyer|consultation|retainer|invoice)\b/i,
pitch: /\b(services?|support|expert|outsourc\w*|analytics|resume|job|newsletter|webinar|expand your reach)\b/i,

Notes

<details><summary>For the curious</summary>

</details>

License

MIT License.

Information for nerds: the source code

Everything this project is made of, as committed: the code, its README files and its license. No build step or account needed to read it.

⬇ Download source (.zip)

garnet-gmail-spam-check.zip · 185 KB · released under the license stated on this page.

Please test before relying on these tools. They are shared as-is, with no warranty. They work on my own computers, but your system, settings and software versions may differ, so please try them in a safe setting first. If something doesn't work, you can ask Claude (or another AI coding assistant) to look into it, and I'd appreciate hearing what you found and how you fixed it. You are also welcome to just let me know at support@veered.org, and I'll look into it.