Business ops

Stop Paying the Bot to Check Empty Email: A Free Apps Script Watches Gmail and Wakes Grok Bot Only When Mail Arrives

  • Level Intermediate
  • Setup1–3 hrs (estimated)
  • Evidence Anecdotal
  • CostNot stated in source
  • No-codeYes
Grok BotSource-linked

What did they do with Grok Bot?

His Grok Bot checked Gmail four times every weekday, and most runs found nothing but still used credits. So he split the job: a free Google Apps Script checks one Gmail label every 30 minutes on weekdays and only calls the bot's webhook when there's genuinely new mail, passing sender, subject and snippet. A dry run caught a newsletter, so they added -unsubscribe to the search. A daily health check emails him if the script hasn't run in 24 hours. Setup took about 15 minutes, and the bots wrote the code.

How it went

X post by @rajchudasama (Nov 9, 2026 UTC) with a 6-step setup: webhook-triggered routine, free Apps Script polling every 30 min on weekdays, dedupe, -unsubscribe filter after a dry run, daily health check, old schedule kept a week for comparison; about 15 minutes. Bio mentions his own hotel sales product, which the post doesn't pitch. Apps Script needs Gmail permissions on your account; read what it asks for before approving

Worth knowing

  • X post by @rajchudasama (Nov 9, 2026 UTC) with a 6-step setup: webhook-triggered routine, free Apps Script polling every 30 min on weekdays, dedupe, -unsubscribe filter after a dry run, daily health check, old schedule kept a week for comparison; about 15 minutes. Bio mentions his own hotel sales product, which the post doesn't pitch.
  • Apps Script needs Gmail permissions on your account; read what it asks for before approving.

Prompt

Cleaned version rewritten from the source — not a direct quote.

Switch my [Gmail routine] to a webhook trigger. Then write a Google Apps Script for my account that runs every 30 minutes on weekdays, searches Gmail for new messages with label [label] -unsubscribe, remembers what it already sent, and POSTs only new ones (sender, subject, snippet) to the webhook. Add a daily check that emails me if the script hasn't had a good run in 24 hours. Do a dry run and show me what it would have sent before turning it on.

Recommended

Try it in Grok Bot

  1. Copy the prompt (button below).
  2. Open Grok Bot chat and paste it. Replace any [bracketed] placeholders.
  3. Connect the listed tools (Gmail) as connectors when Grok Bot asks.
  4. If the task repeats, ask: "Make this a daily routine."

Alternatives: the same prompt works in Claude, ChatGPT Agent, OpenClaw.

Set it up

Tools: Gmail · Stack: Grok Bot

  1. Read the original source for full context.
  2. Connect the tools your agent needs.
  3. Paste the prompt and replace [bracketed] placeholders.
  4. Run once manually and check the output before scheduling it.

Generic suggested steps, not from the source.

Evidence

X post by @rajchudasama (Nov 9, 2026 UTC) with a 6-step setup: webhook-triggered routine, free Apps Script polling every 30 min on weekdays, dedupe, -unsubscribe filter after a dry run, daily health check, old schedule kept a week for comparison; about 15 minutes. Bio mentions his own hotel sales product, which the post doesn't pitch. Apps Script needs Gmail permissions on your account; read what it asks for before approving (as of 2026-11-09)

Source: X · 2026-11-09 · Verified by us: not yet · Report broken or outdated

Related use cases

ResearchX · 2026-10

Scrape X bookmarks into a Notion database every few hours

Bookmarks pile up and get forgotten. Jeston Lu built a Grok Bot that scrapes saved X posts every 6 hours and auto-categorizes them into a Notion database so the archive stays searchable.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Strong evidence
Grok BotSource-linked
ShoppingX · 2026-10

Research fun Lego sets and place the order

Elon Musk asked Grok Bot to research the most fun Lego Star Wars kits for young kids and order them — “as easy as that.” Follow-up reporting noted multiple sets totaling a few hundred dollars; treat purchase confirmation as mandatory for your own runs.

  • Level Beginner
  • Setup~30 min*
  • Evidence Strong evidence
Grok BotSource-linkedBeginner-friendly
Inbox & communicationX · 2026-10

Ask your bot for a security review of an email that passed every check

An email from noreply@x.ai landed in a Tesla engineer's inbox. It passed SPF, DKIM and DMARC (the checks that confirm who sent an email) and showed the blue check, but something felt off, so he asked his Grok Bot to do a security review. It found a hidden phishing link, explained why every safety check had passed, and wrote a report to xAI with a proposed fix. He then had it add a security routine that checks his email for anything phishy going forward.

  • Level Beginner
  • Setup~30 min*
  • Evidence Strong evidence
Grok BotSource-linkedBeginner-friendly