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.
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.