Skip to content

Instantly share code, notes, and snippets.

@jrork
jrork / clawdbot-gmail-streaming-pull.md
Created January 27, 2026 01:30
How I Connected Clawdbot to Gmail Without Opening Any Ports

Real-Time Gmail Notifications Without Exposing Your Server

TL;DR: I set up instant Gmail notifications to my AI assistant using Google Pub/Sub's streaming pull — no webhooks, no exposed ports, no ngrok. Just an outbound gRPC connection that receives push notifications in real-time.

The Problem

I wanted my AI assistant (Clawdbot, running on a Raspberry Pi 5) to know when I get important emails. The obvious solutions all had problems:

  • Polling Gmail API — Works, but 5-minute latency feels archaic
  • Gmail Pub/Sub with push webhooks — Requires exposing a port to the internet. No thanks.

Keybase proof

I hereby claim:

  • I am jrork on github.
  • I am jrork (https://keybase.io/jrork) on keybase.
  • I have a public key ASAQuDCp0SD5W4tRdmIDbsRkvTFOTcEpNpmX3CFt00Fwbwo

To claim this, I am signing this object: