See llms.txt for all machine-readable content.

Back to Templates

Send a daily AI morning briefing with Google Calendar, Gmail, and OpenAI

Quick overview

This workflow runs every weekday morning, pulls today’s Google Calendar events and recent unread Gmail messages, uses an OpenAI-compatible chat completions API to write a short plain-text briefing, and emails the briefing to you via Gmail.

How it works

  1. Runs every weekday at 7 AM (or on-demand via a manual trigger for testing).
  2. Reads your settings (timezone, goal, inbox search, model, and email recipient) and fetches today’s events from Google Calendar.
  3. Queries Gmail for unread inbox emails from the last 24 hours using your configured Gmail search filter.
  4. Cleans and summarizes the raw data by sorting meetings, flagging back-to-back events, calculating total meeting time and your longest free focus block, and trimming each email to sender/subject/snippet.
  5. Sends the prepared calendar and email context to an OpenAI-compatible API endpoint to generate a three-part briefing (TODAY, INBOX, ONE THING) under the configured word limit.
  6. Formats the final email body using the AI response or a fallback plain list if the AI request fails, then sends it to your address through Gmail.

Setup

  1. Add Google Calendar OAuth2 credentials and select them for the calendar-read step, ensuring the calendar ID matches the calendar you want to summarize.
  2. Add Gmail OAuth2 credentials and select them for both reading unread emails and sending the briefing email.
  3. Add an HTTP Header Auth credential for your LLM provider (Authorization: Bearer YOUR_API_KEY) and set the LLM base URL and model to match your OpenAI-compatible endpoint.
  4. Update the workflow settings values (recipient email, timezone, goal, inbox search, and workday hours) to match your preferences, then test with the manual trigger before activating the schedule.