WhatsApp bot that reads school letters and generates Google Calendar links.
- Parent sends a photo or PDF of a school letter via WhatsApp
- Claude AI reads the document and extracts all events and dates
- Bot replies with a formatted list and one-tap Google Calendar links
- Parent taps a link → event opens pre-filled in Google Calendar → Save
- 📸 Photos of school letters (JPG, PNG, WebP, HEIC)
- 🖼️ Screenshots of school apps or WhatsApp messages
- 📄 PDFs attached to school emails
- Express.js + TypeScript
- Twilio WhatsApp API (sandbox for dev, Business API for prod)
- Anthropic Claude API (vision + document reading)
- Google Calendar pre-filled URLs (no OAuth needed)
npm installcp .env.example .env
# Add your Twilio and Anthropic keys- Sign up free at twilio.com
- Go to Messaging → Try it out → Send a WhatsApp message
- Join the sandbox by sending the join code to the sandbox number
- In Sandbox Settings, set the webhook to your ngrok URL: https://your-ngrok-url.ngrok.io/webhook
# Terminal 1 — start the server
npm run dev
# Terminal 2 — expose it publicly
npx ngrok http 3000Send a photo or PDF of any document with dates to the Twilio sandbox number.
- Push to GitHub
- Connect repo to Railway (railway.app)
- Add environment variables in Railway dashboard
- Railway auto-deploys on every push
- Update Twilio webhook URL to your Railway URL
src/
├── index.ts # Express server + webhook handler
├── types/index.ts # TypeScript types
└── lib/
├── anthropic.ts # Claude vision + PDF reading
├── calendar.ts # Google Calendar URL builder
├── messages.ts # WhatsApp reply formatting
└── twilio.ts # Twilio client
Parent sends a photo of a school letter.
Bot replies:
Found 2 events! 📅
1. 🎒 *Year 4 Science Museum Trip*
📆 Thursday 20 March at 8:15am
📍 Meet at school gates
ℹ️ Packed lunch required. Return by 4pm.
➕ Add to Google Calendar:
https://calendar.google.com/...
2. 🎒 *Permission Slip Deadline*
📆 Wednesday 19 March
➕ Add to Google Calendar:
https://calendar.google.com/...
_Powered by FamilyBrief_ 🗓️