EB Ed Byrne

Inbox Gatekeeper

A Gmail plug-in that filters unknown and first-time senders out of your inbox so you can review and approve later. Optionally replies with a "pay to deliver" option for the sender to get to your Inbox.

Free Gmail Outlook Apple Mail

No server, no app, no subscription. Built with Google Apps Script + Stripe.

What it does

Gmail doesn't let you filter out unknown senders natively. Inbox Gatekeeper fills that gap.

Unknown Sender Filter

Every 15 minutes, the script checks your inbox. If a sender isn't in your Google Contacts, your "Other Contacts" (people you've emailed before), or a whitelisted domain — they get labeled Unknown Senders and archived out of your inbox for review later.

Newsletters with unsubscribe headers pass straight through. So do emails from 80+ common services — Amazon, FedEx, LinkedIn, your bank, Substack, and more. No false positives from the stuff you actually signed up for.

amazon.com linkedin.com fedex.com paypal.com substack.com + 75 more

Pay to Deliver

Optionally, Inbox Gatekeeper sends a one-time auto-reply to unknown senders with a Stripe payment link. You set the price — it can be anything you want. Frame it as a coffee, a donation to charity, a carbon credit, or a serious filter. It's your inbox.

If someone pays and they turn out to be legitimate, you can refund them with one click in Stripe. The script never replies to no-reply addresses, newsletters, or the same person twice.

you set the price donation-friendly refundable

How it works

1 Built on Google Apps Script

Google Apps Script is Google's built-in scripting platform — it's like a macro system for your Google account. It runs on Google's servers, not your computer, and has native access to Gmail, Contacts, and Calendar without any third-party dependencies. Think of it like an Excel macro, but for Gmail.

Installing is just copy-paste. You open script.google.com, create a new project, paste in the code, and run a setup function. No terminal, no package manager, no deployment. It takes about 10 minutes and requires zero coding knowledge. Once set up, it runs 24/7 on Google's infrastructure — even when your computer is off.


2 What happens in your inbox

Every 15 minutes, the script checks your recent inbox messages. Each sender is matched against your Google Contacts, your "Other Contacts" (everyone you've ever emailed), a list of 80+ common services, and whitelisted domains you configure. Newsletters with unsubscribe headers also pass through.

If a sender doesn't match any of those checks, they're unknown. Their email gets labeled Unknown Senders and archived — out of your inbox, but easy to find and review whenever you want. Add them to your contacts and they'll pass through next time.


3 Pay to Deliver via Stripe

If you want to go further, you create a free Stripe payment link — takes about 5 minutes. You choose the amount, the framing, and where the money goes. Inbox Gatekeeper then includes this link in its auto-reply to unknown senders.

When someone pays, Stripe sends you a notification. You check your Unknown Senders label, find their email, and decide whether to reply. If they're legitimate and you want to refund them, one click in Stripe handles it. The whole flow is deliberately manual to keep the script simple and dependency-free.

Under the hood

The technical details, for those who want them.

Install guide

10 steps. No coding knowledge needed. About 10 minutes.

Step-by-step instructions
Download Script
1
Open Google Apps Script

Go to script.google.com and click New Project. Make sure you're signed into the Google account whose Gmail you want to filter.

2
Paste the script

Select all the default code (Cmd+A or Ctrl+A), delete it, and paste in the entire contents of the downloaded gmail-gatekeeper.js file. Hit Cmd+S / Ctrl+S to save.

3
Add the People API

In the left sidebar, click the + next to Services. Find People API in the list and click Add. This lets the script check your contacts.

4
Add the Gmail API

Click Services (+) again and add the Gmail API. This lets the script detect your send-as aliases so auto-replies come from the right address.

5
Configure your settings

Edit the configuration section at the top of the script:

  • Add your trusted domains to WHITELISTED_DOMAINS (your company domain, etc.)
  • Review COMMON_SERVICES — add or remove services as needed

Save again.

6
Run setup

In the toolbar, click the function dropdown (it probably says myFunction), select setup, and hit the ▶ Run button. Google will ask you to authorize — click through the permissions flow.

You'll see a scary "Google hasn't verified this app" screen. Click Advanced"Go to [project name] (unsafe)". This is normal for personal scripts.
7
Verify the trigger

Click the clock icon (⏰) in the left sidebar. You should see a trigger listed for processNewMessages, set to run every 15 minutes. If it's there, the filter is live.

8
Set up Stripe (optional)

Skip this step if you only want the filter without auto-replies. Otherwise:

  • Go to stripe.com and create a free account
  • In the dashboard, go to Payment Links and click + New
  • Create a product, set your price to whatever you want, make sure "Collect email address" is on
  • Copy the payment link URL and paste it into STRIPE_LINK in the script
  • Replace Your Name with your name in the config

Save the script again.

9
Test with a friend

Before turning on auto-replies:

  • Put a friend's email address in TEST_EMAIL at the top of the script and save
  • Have them email you from an address that's not in your contacts
  • Select testRun from the dropdown and run it — their email gets filtered
  • Select testAutoReply and run it — your friend receives the auto-reply with your Stripe link
  • Ask them to confirm it looks right and the payment link works
10
Go live

Change AUTO_REPLY = false to AUTO_REPLY = true at the top of the script, save, and you're done. The filter runs whether auto-reply is on or not — you can always enable it later.

Common problems

Most issues happen during setup. Here's what to look for.