Against AI-generated spam, a deterministic script: the most effective defense may be the simplest

🕒 Published on Zendoric: October 31, 2026 · 09:09
✨ AI-generated · how it's made
A founder explains on Hacker News how he stops AI-generated sales email with a Google script that sets aside unknown senders. No AI, no subscriptions, and one cost: the pitch can still get through.
By Hacker News · October 30, 2026.
A founder has shared on Show HN, Hacker News' section for personal projects, a Google Apps Script that fights unsolicited sales outreach which, as he describes it, is clearly AI-generated. According to his account, Google's spam filter does not flag these emails and his phone buzzes at all hours, especially in the morning.
The solution is minimal and deterministic. The script runs once a minute and checks what is in the inbox. If the sender is someone the author has never written to, it moves the message to a "purgatory" folder that he reviews later. Apps Script is Google's cloud-based JavaScript platform for automating tasks across its products.
The author himself says Gemini suggested a script that would use AI to classify the emails. He rejected it for two reasons: he did not want to send all his email to a language model, and its effectiveness could vary over time as the cat-and-mouse game between AI spam and AI detection progresses.
He acknowledges one limitation: the script does not stop the email from reaching the inbox, so it could trigger a notification. That is enough for him because the Gmail app on his phone only notifies him of emails marked as important. Compared with paid tools or those that require senders to prove they are human, his approach is free and does not bother his correspondents.
The linked source is the general Apps Script page, which does not describe the script. The details above therefore come from the author's description, and we have not been able to verify the code or its performance.
**Our take.** What is interesting is not the script but the principle. AI has driven the cost of sending a message that looks personalized down to almost zero, and the text no longer serves to distinguish a legitimate sender from an automated one. When content stops being a signal, you have to filter by something that cannot be fabricated so cheaply: a prior relationship. "Have I ever written to them?" is a crude rule, but it does not depend on any model an attacker can learn to evade.
It has an obvious cost. The same rule also sidelines the client, candidate or investor writing for the first time, and the peace of mind gained is paid for in opportunities that may never be seen. A purgatory that is checked now and then only works if it actually gets checked.
In general, this is the short-term pattern generative AI leaves behind: the cost of producing noise falls faster than the cost of filtering it, and we pay for the mismatch with our attention. In the long term, the same technology can be expected to give that time back, with trusted agents managing our inboxes under clear, auditable permissions. In the meantime, sometimes the most sensible defense is the simplest one and the one that hands the least data to third parties.
🔗 Related on Zendoric


