Automatically create Google Calendar events from your emails using AI
Forward any email and it extracts event details automatically
Uses Claude AI to understand complex event descriptions
Events appear in your Google Calendar instantly
Processes emails within seconds using webhooks
https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/calendarhttps://YOUR-APP-NAME.up.railway.app/callback
Replace YOUR-APP-NAME with your Railway app name (you'll get this after deploying)
brew install railway
railway login
git clone https://github.com/yourusername/email-calendar-tool
cd email-calendar-tool
railway init
railway up
In Railway Dashboard → Your Project → Variables tab, add:
| Variable | Value | Required |
|---|---|---|
GOOGLE_CREDENTIALS |
Paste the entire contents of the downloaded OAuth JSON file | Yes |
ANTHROPIC_API_KEY |
Your Anthropic API key from console.anthropic.com | Yes |
TIMEZONE |
Your timezone (e.g., America/New_York, Europe/London) |
Yes |
FLASK_SECRET_KEY |
Any random string for session security | Recommended |
https://email-calendar-tool-production-xxxx.up.railway.app) and update the OAuth redirect URI in Google Cloud Console to match.
GOOGLE_TOKEN environment variable in Railway to persist across deploymentscalendar-event to the emailSubject: Dinner with Sarah
Hey! Let's meet for dinner next Friday at 7pm at
The Italian Place on Main Street. Looking forward to it!
The AI will extract:
By default, the tool checks for new emails every 5 minutes. For instant processing, set up Gmail Pub/Sub:
gmail-notificationshttps://YOUR-APP.up.railway.app/webhook/gmail[email protected] publish permissions on the topicYour OAuth redirect URI doesn't match. In Google Cloud Console:
https://YOUR-RAILWAY-URL/callbackYou need to add yourself as a test user:
Railway's filesystem is ephemeral. To persist your token:
GOOGLE_TOKEN environment variablecalendar-event (case-sensitive)ANTHROPIC_API_KEY is validrailway logscurl -X POST https://YOUR-APP/trigger| Variable | Default | Description |
|---|---|---|
GOOGLE_CREDENTIALS | - | OAuth client JSON (required) |
GOOGLE_TOKEN | - | OAuth token JSON (set after first login) |
ANTHROPIC_API_KEY | - | Anthropic API key for AI parsing |
TIMEZONE | UTC | Your timezone for event times |
GMAIL_LABEL | calendar-event | Gmail label to monitor |
CALENDAR_ID | primary | Target Google Calendar ID |
CHECK_INTERVAL_MINUTES | 5 | Polling interval (if not using Pub/Sub) |
FLASK_SECRET_KEY | random | Session encryption key |