A smart, conversational AI assistant that helps users discover physical events, plan their attendance, and seamlessly add events to Google Calendar — all through natural language.
Physical Event Experience
EventPulse AI is designed to enhance every step of the physical event journey — from discovery to attendance. Whether it's a concert, sports match, tech conference, food festival, or local meetup, EventPulse helps users:
- Discover events relevant to their interests and location
- Plan their attendance (logistics, what to bring, arrival tips)
- Schedule events directly to Google Calendar via OAuth
- Get answers about venues, accessibility, parking, and tickets
EventPulse uses Google Gemini 1.5 Flash as the conversational brain. Each user message is sent to Gemini with a rich system prompt that:
- Defines the assistant's persona and responsibilities
- Instructs Gemini to detect calendar intent in the conversation
- When intent is detected, appends a structured
calendar_actionJSON block to the response
The Flask backend parses this block, strips it from the visible reply, and surfaces a "Add to Calendar" card in the UI — keeping the UX clean and actionable.
- Full OAuth 2.0 flow via
google-auth-oauthlib - Credentials stored securely in the Flask server-side session
- Events are created with 60-minute and 10-minute reminders
- Users are redirected to the event in Google Calendar after creation
Each browser session maintains a conversation history (stored server-side by session ID), giving Gemini full context to answer follow-up questions naturally.
User types message
│
▼
Flask /chat endpoint
│
▼
Gemini 1.5 Flash (with session history + system prompt)
│
├── Detects calendar intent? ──Yes──► Appends calendar_action JSON block
│ Backend parses it
│ Returns clean reply + structured data
▼
Frontend renders:
• Conversational reply (Markdown formatted)
• [Optional] Calendar card with "Add to Calendar" button
│
User clicks "Add to Calendar"
│
▼
Flask /calendar/add endpoint
→ Google Calendar API → Event created ✅
→ User redirected to calendar event URL
- Python 3.10+
- A Gemini API key from Google AI Studio
- A Google Cloud project with Calendar API enabled and OAuth 2.0 credentials
git clone https://github.com/YOUR_USERNAME/eventpulse-ai.git
cd eventpulse-ai
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtcp .env.example .env
# Edit .env and add your GEMINI_API_KEY and FLASK_SECRET_KEY- Go to Google Cloud Console
- Create a project → Enable Google Calendar API
- Create OAuth 2.0 Client ID (Web application)
- Add
http://localhost:5000/calendar/callbackas an authorized redirect URI - Download the JSON and save as
client_secrets.jsonin the project root
python app.py
# Visit http://localhost:5000eventpulse-ai/
├── app.py # Flask application + Gemini + Calendar logic
├── requirements.txt # Python dependencies
├── .env.example # Environment variable template
├── .gitignore
├── templates/
│ ├── index.html # Main UI (chat interface)
│ └── callback.html # OAuth redirect handler
└── README.md
- The app runs on a single server instance (conversation history is in-memory; for production, use Redis or a database)
- Users are assumed to have Google accounts for Calendar integration
- Event recommendations are AI-generated by Gemini based on its knowledge; for real-time event data, a third-party events API (e.g., Ticketmaster, Eventbrite) could be integrated
- Timezone defaults to UTC for calendar events; users should specify their timezone for accuracy
- The
client_secrets.jsonis never committed to the repository (protected by.gitignore)
- OAuth credentials are stored in server-side Flask sessions, never exposed to the client
client_secrets.jsonand.envare excluded via.gitignore- All API calls are server-side only — no API keys are sent to the browser
- Input validation on all
/chatand/calendar/addendpoints
| Service | Purpose |
|---|---|
| Gemini 1.5 Flash | Core LLM for conversation, event understanding, and calendar intent detection |
| Google Calendar API | Creating and managing calendar events from chat |
| Google OAuth 2.0 | Secure user authentication for Calendar access |
- Code Quality: Clean separation of concerns — routing, AI logic, and calendar logic are modular
- Security: No secrets in client-side code; server-side sessions; gitignored credentials
- Efficiency: Gemini Flash model for fast responses; minimal API calls per turn
- Accessibility: Keyboard-navigable UI; semantic HTML; high-contrast design
- Google Services: Meaningful, functional integration of Gemini + Calendar, not just decorative
Built for Prompt Wars Virtual — Physical Event Experience vertical.