Notion Workflows
Automated workflows for managing and enriching Notion databases with AI-powered content generation.







Overview
A collection of automated workflows that manage and enrich Notion databases — from meal planning and shopping lists to travel guides and pub crawl routes. The system runs nightly via GitHub Actions, using TypeScript, the Notion API, and Google Gemini AI to automate repetitive tasks and generate intelligent content.
Key Workflows
Manage Shopping
End-to-end shopping list manager that extracts ingredients from meal plans and uses Gemini AI to categorize items automatically.
Populate Films & TV
Enriches a films/TV database with metadata from TMDB and OMDb APIs — posters, overview, runtime, genres, directors, and ratings.
Populate Meals
Uses Gemini AI to auto-complete meal recipes with ingredients and cooking instructions following British English conventions.
Populate Pubs
Calculates optimal pub crawl routes using geolocation, Haversine formula, and nearest-neighbour optimization.
Manage Meal Planner
Maintains a rolling 28-day meal planner by archiving past days and creating future day pages automatically.
Events Calendar
Generates recurring calendar events from templates, creating events for the next 12 months based on weekday and week ordinal rules.
Technologies
Project Structure
utils/ ai.ts # Gemini AI client and batch annotation helper logger.ts # Structured logger with log levels notion.ts # Notion client, page/block CRUD helpers parsing.ts # Property builders for Notion API requests workflows/ cleanup-shopping/ # Remove checked items from shopping lists events-calendar/ # Generate recurring calendar events manage-meal-planner/ # Rolling 28-day meal planner manage-shopping/ # AI-powered shopping list management populate-films-and-tv/ # TMDB/OMDb metadata enrichment populate-meals/ # AI-generated recipes populate-pubs/ # Optimal pub crawl routing populate-travel-database/ # AI travel destination annotations populate-walks-database/ # AI walking location annotations
Technical Highlights
- Automated CI/CD: All workflows run on nightly cron schedules via GitHub Actions with manual trigger support
- AI Integration: Leverages Gemini 2.5 Flash with JSON response mode for structured content generation
- Geospatial Algorithms: Implements Haversine formula and nearest-neighbour optimization for route planning
- API Orchestration: Integrates multiple external APIs (Notion, TMDB, OMDb, Gemini) with robust error handling
- Modular Architecture: Shared utilities for logging, parsing, and API clients enable rapid workflow development