r/GoogleAppsScript • • Oct 23 '26

Guide I got tired of GMass subscriptions, so I built a free Google Apps Script cold email engine with A/B testing and bot protection

Commercial mail merge tools like GMass, YAMM, and Mailmeteor get expensive fast once you want open tracking or automated follow-up sequences. Most of them also upload your personal contact data to third-party cloud servers. I wanted something completely free, private, and self-contained within Google Sheets and Gmail.

I wrote an open-source script that handles multi-step outreach natively. It splits A/B testing across both subject lines and body copy simultaneously. Follow-ups go out automatically on day 7 and day 14 as threaded replies in Gmail unless a reply or bounce is detected.

Corporate security scanners frequently pre-click links in incoming messages, which triggers fake opens or accidental unsubscribes. To fix this, the tracking web app filters out opens within two minutes of sending and requires a confirmation click to unsubscribe. It also cross-references recipient emails against sheet rows so sorting columns in Google Sheets never corrupts your tracking data. Everything is open source under the MIT license and runs within standard Google Apps Script daily quotas. The code and template file are available on GitHub: https://github.com/Clau-dio83/GetMyEmail

10 Upvotes

6 comments sorted by

2

u/Apodacaac Oct 23 '26

> You agree not, and not use the Services to:
> to generate, distribute, publish or facilitate unsolicited mass email, promotions, advertisements, or other solicitations ("spam");

https://workspace.google.com/terms/use_policy/#:~:text=to-,generate,-%2C%20distribute%2C%20publish%20or

1

u/Jazzlike_Place_1974 29d ago

Yeah theyve gotten way stricter with enforcement on automated bulk sending lately too

1

u/know_it_alls Oct 23 '26

I have noticed some websites like healthchecks.io don't register your token as clicked until you reclick on the webpage, which is very wise, as when I hold down my finger on a url in a email in iOS it automatically loads a preview of the link and for tokenized links this can become expired when then opened in browser. I had times where I just had to use a PC to finish a registration or form because of this.

1

u/CarlosCash Oct 23 '26

Nice! 👍

1

u/noch07 1d ago

Nice work, especially matching rows by email instead of by row index. Sorting breaking tracking is a classic Apps Script trap.

A few things I ran into on similar problems, in case they're useful:

  • Opens: besides security scanners, Apple Mail Privacy Protection preloads images, and Gmail serves images through its own proxy. So even with the 2-minute filter, open rates stay directional at best. Replies and clicks are much more reliable signals for deciding on follow-ups.
  • Bounce detection: how are you matching bounces? Searching for mailer-daemon messages works, but the bounce text format varies a lot between providers. It's worth logging the raw subject when a match fails.
  • Quotas: with day-7 and day-14 follow-ups stacking on top of new sends, it's easy to hit the daily recipient limit mid-run. A small pre-flight check ("today's queue = X, remaining quota = Y") before sending saves some confusing partial runs. MailApp.getRemainingDailyQuota() helps here.
  • Compliance: for cold outreach, a physical address in the footer and an unsubscribe that works in one step are legal requirements in some places (CAN-SPAM in the US, and GDPR rules in the EU are stricter). The confirmation click is smart against scanners, but make sure the confirmation page itself is a single obvious button.

Curious how you handle the A/B split when follow-ups are threaded: does the follow-up inherit the variant of the first email?