Skip to content

Automate Your Calendar with AI

Category Everyday AI (ChatGPT, Gemini, Grok, n8n)
Status ๐ŸŸก Partially completed
Repo nextwork-automate-your-calendar-with-ai
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

๐Ÿ“š NextWork learning project. This is a practice project I built while working through NextWork's Automate Your Calendar with AI guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning โ€บ Everyday AI (ChatGPT, Gemini, Grok, n8n)
Status: ๐ŸŸก Partially completed

Overview

Letting a model read meeting requests is handy, but it shouldn't be the one deciding. Mine extracts the details, then plain code validates them, checks the calendar, and either books, proposes another time or asks, with every reply left as a draft.

Summary

I built my own meeting-request workflow in Python instead of n8n with Google Calendar and ChatGPT. A local model (qwen2.5:3b in JSON mode) pulls the date, time, length and topic out of each message, and my code validates the result rather than trusting it. The slot is checked against my .ics calendar and working hours: free slots are booked into the calendar file, clashes get the next free time proposed, and vague requests get a reply asking for details. Every reply is a draft; nothing is sent. On four sample requests the model extracted all fields correctly (including nulls for the vague one): 2 booked, 1 clash with a counter-proposal 30 minutes later, 1 asked for details. 2 tests with a stubbed model pass, covering booking, clash, vague request, out-of-hours and length checks. Partial: no n8n, Google account, Gmail or ChatGPT; the calendar is a local .ics file.

The checks behind this are in docs/verification.txt.

Skills & tools

Python, Ollama (JSON mode), iCalendar (.ics), Scheduling logic, pytest

What I built

  • calbot.py: extract (local model, JSON output), validate (date, time and a sane length), load_ics / add_ics, clash, next_free (30-minute steps within working hours on weekdays) and handle (book, propose or ask, with a draft reply).
  • requests.json and calendar.ics: four sample requests I wrote and a starting calendar with two events.
  • docs/run.json and docs/calendar-after.ics: the real run on the local model and the updated calendar.
  • tests/test_calbot.py: booking, clash with counter-proposal, a vague request, out-of-hours and length validation, with the model stubbed.

How to run

ollama pull qwen2.5:3b
python calbot.py requests.json docs/calendar-after.ics
python -m pytest -q tests

Verification

I ran the verification command on 2026-12-03. The full output is in docs/verification.txt.

/workspace/nextwork-portfolio/.venv/bin/python -m pytest -q -p no:cacheprovider tests 2>&1 | tail -1 | grep -q '2 passed' && grep -q 'clashes with Dentist' docs/run.json && echo CAL OK

What isn't done, and why

No n8n, Google OAuth, Gmail, Google Calendar or ChatGPT: the requests are a JSON file, the calendar is a local .ics file, the model is local qwen2.5:3b, and the replies are drafts that are never sent.


Original project: https://nextwork.ai/projects/6ac4b62d-0558-51eb-a3cc-89522aa5cf45 ยท Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ /workspace/nextwork-portfolio/.venv/bin/python -m pytest -q -p no:cacheprovider tests 2>&1 | tail -1 | grep -q '2 passed' && grep -q 'clashes with Dentist' docs/run.json && echo CAL OK

CAL OK

[exit code 0]