Repository navigation
💡 New script: gmail-to-calendar-events (Gemini-powered event extraction from emails to Calendar) #563
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
A new Gemini-powered catalog script that scans incoming emails for event-like content — meetings, deadlines, appointments, social events — and creates corresponding Google Calendar events automatically. Uses the proven gmail-ai-classifier Gemini integration pattern with structured JSON output. Events are created in a configurable "Pending Review" calendar so users can approve before moving to their main calendar, addressing false-positive risk while preserving automation value.
Market Signal
AI email-to-action is the hottest feature area in 2026 productivity tools. Superhuman ($33-40/mo) and Shortwave ($30-120/mo) both offer email-to-calendar features as premium capabilities. Gmail's native event detection only handles specific structured patterns (flight confirmations, restaurant reservations, event invitations with ics attachments) and requires manual click-to-add. The broader pattern — extracting informal appointments, deadlines, and social events from any email — remains unsolved at the free tier. Zapier's AI-powered email parsing now costs 3-5x per action under the new model-tier pricing (June 15, 2026). Carly AI and Reclaim.ai charge $15-25/mo for calendar intelligence features. alfred_ ($25-30/mo) offers AI-driven daily briefings with action item extraction.
User Signal
The project already has a proven Gemini integration pattern in gmail-ai-classifier (
classifyEmailWithGeminiinsrc/gmail-ai-classifier/src/index.js) — structured JSON output, confidence thresholds, exponential backoff retry, response validation. Issue #491 (AI-Powered Gemini Classifier) confirms maintainer commitment to AI-powered scripts. The existing Vertex AI Advanced Service (GA January 2026) provides direct Gemini access from GAS without REST API overhead. The 11 existing Gmail idea proposals show strong email intelligence interest, but none cover general event extraction. Related ideas #550 (travel itinerary) and #504 (meeting prep) address specific calendar use cases but not the general email-to-event pipeline.Technical Opportunity
The gmail-ai-classifier blueprint provides a tested, production-ready pattern:
UrlFetchApp→ Gemini REST API withresponse_mime_type: 'application/json'→ validated structured response → GAS action. The same architecture applies directly: scan labeled/filtered emails → extract event data via Gemini → create Calendar events viaCalendarApp.createEvent(). The Vertex AI Advanced Service (GA January 2026) offers an alternative integration path with direct Gemini access. Multi-modal Gemini prompts (new in 2026) can process email attachments (PDFs, images) for event details embedded in documents. The "Pending Review" calendar pattern (create events in a separate review calendar) is a well-established UX solution for AI-generated content.Assessment
Adversarial Review
Strongest objection: Gmail already has 11 idea proposals in the backlog, saturating the Gmail category. Gmail's native Gemini-powered features (AI Inbox, event chips) are expanding rapidly and may close this gap natively. Gemini may hallucinate events from hypothetical date mentions ("how about Tuesday?") or past dates, creating calendar noise.
Rebuttal: This script bridges Gmail AND Calendar — it's cross-service, not just another Gmail processor. Gmail's native event chips are limited to structured confirmation emails (airlines, restaurants, Eventbrite); they fundamentally miss informal mentions ("team lunch at noon Thursday", "project deadline next Friday", "dentist appointment September 3rd at 2pm"). The confidence threshold (configurable, default 0.85) combined with a future-date-only filter eliminates most hallucinated events. The Pending Review calendar is the right UX tradeoff: users get event PROPOSALS they review in bulk (~5 seconds per event) rather than missing events entirely. Power users who trust the extraction quality can configure direct creation on their main calendar.
Suggested Next Step
Prototype the Gemini prompt for event extraction: define the structured JSON schema (
{title: string, date: "YYYY-MM-DD", startTime: "HH:MM", endTime: "HH:MM", location: string|null, confidence: number, reasoning: string}), test against 20 sample emails of varying formality (formal invitations, informal mentions, newsletters with event listings, ambiguous references), and measure extraction accuracy. Reuse the gmail-ai-classifier's testedclassifyEmailWithGeminipattern with modified prompt and response schema.All reactions