On Claude Code and Stubbornness
CRMs run the gamut. Behemoths need Salesforce to manage thousands of daily leads. At the other end of the spectrum are the CRM holdouts. Plenty of independent writers and speakers rely on their inboxes to manage a relatively small number of customers and prospects. Hell, even some hidebound small business owners think that email can serve as that type of critical business system. It can't.
I use a modified version of this simple Notion-based CRM. It's not perfect, but it more than meets my needs. If you fill out the contact form on my website, Notion will notify me that you want to discuss a potential speaking or writing engagement or media opportunity.
The Continued Ubiquity of Spam
Regardless of a CRM's size, some inquiries invariably will be bullshit or weak. The fleas come with the dog. Captcha helps, but little prevents determined spammers and scammers from filling out website forms with bum info—or writing scripts to do so.
No surefire way exists to stop all meaningless messages from appearing in your CRM and wasting some of your time. You sure as hell aren't powerless against bad actors, though. Ours is an era of citizen development. One no longer needs to reflexively accept annoyances like spam—at least all the time. Under many circumstances, we can improve our tech. It just takes a little effort, curiosity, and a smidge of stubbornness.
Approach #1: No-Code Automation Tools
I've been doing Notion development long enough to know that I'd have to get creative. In other words, native/vanilla Notion wasn't going to get the job done.
I began my quest to minimize CRM spam by exploring the glorious, magical no-code automation tchotchkes. Without a lick of coding knowledge, anyone can connect different systems and apps in thousands of ways. Zapier, Make.com, and Relay.app (my personal favorite) are just a few popular options.
Zapier, Make.com, and Relay.app can't do everything.
Even when coupled with Notion webhooks, these third-party, drag-and-drop tools can't do everything, though. They suffer from real limitations. For whatever reason, reliably deleting spammy database entries from an existing Notion database seems to be one of them.
Approach #2: New NotionAI Features
In theory, Notion's new custom AI agents—now in beta—would do the trick.
In a word, nope.
Noodling with them bore no fruit. I had to manually delete bogus database entries despite Notion's frustrating assurances to the contrary. Different prompts didn't help. After about an hour, I pulled the plug on this method.
Three years ago, I would have called it a day and admitted defeat. Today we all can access an insanely powerful tool.
Approach #3: Agentic AI
Claude Code gives non-developers superpowers. I suspected that, after creating a custom Notion integration, I could use the white-hot agentic Swiss Army knife to:
- Suggest an appropriate way to automatically purge illegitimate inquiries from my Notion CRM database. (Importantly, Claude Code knows the extent of my technical chops after the last three months.)
- Help me build it.
Claude Code showed promise right out of the gate. After forumulating a plan with me, it went to work. The agentic AI tool spit out the requisite scripts and even set up the cron jobs for me. I did some testing and the script killed the spam. Forty-five minutes later, we crossed the finish line. Pretty smart.
Inside Notion, when a new record arrives in my CRM, the app automatically identifies spam via some custom logic I built. Notion then sends offending messages to a dedicated database view—one intentionally with notifications silenced. In the end, the Python script knows which Notion records to kill. Finally, I can always retrieve false positives from the trash if need be.
I decided to release this little doohickey as my first open-source project on GitHub. (Golf applause.)

Go ahead and fork it. You certainly don't have to use it to kill spam in your Notion-based CRM. Perhaps you want to delete leads greater than ten years old. Use it on whatever Notion database and for whatever reason you like. Change the deletion interval. The world is your oyster.

Member discussion