Brief Matinal: a private daily podcast made with n8n and AI

907 words

  • Software
  • Automation
  • AI
  • Open source

I had a scheduled task in Claude that put together a brief of my day every weekday at 8:30: calendar, email, newsletters. It worked, but it had three problems. It arrived late, because I leave home at 7. It ran on holidays. And it was text, which I can't read while driving.

So I replaced it with a personal podcast: every weekday at 6:30 a five-to-nine-minute episode comes out, just for me, and my phone has already downloaded it when I get in the car.

The code is open source: github.com/RafaelKC/daily-brief.

What goes into an episode

  • Weather: low, high, chance of rain and whether it is an umbrella day.
  • Calendar: every Google calendar, for today and the next business day.
  • Tasks: what is due today and what is overdue in TickTick.
  • Bills: what is due today in Organizze, the source of truth for my finances.
  • Email: what needs attention and what got resolved, without promotions.
  • News and newsletters: RSS feeds and, for newsletters without RSS, Claude itself finds the latest issue on the web.

All with one rule: only what is new since the previous episode. Today's episode receives yesterday's notes and repeats nothing.

How it works

n8n (6:30, Mon–Fri)
  ├─ holiday? → BrasilAPI + local holidays → stop
  ├─ collect: Calendar, Gmail, TickTick, Organizze, RSS, weather
  └─ POST to the brief-worker
        ├─ claude -p         → spoken script + notes with links
        ├─ Gemini TTS        → MP3
        └─ private feed.xml  → podcast app

n8n only orchestrates and fetches data. Every source has error handling: if TickTick is down, the episode goes out without it and the audio says so.

The brief-worker is a small Python service in a container next to n8n. It receives the data, calls Claude, makes the audio and publishes the episode.

Claude without paying for the API

The thing I most wanted to solve was not having to pay for the API just for this. Claude Code has claude setup-token, which creates a long-lived token tied to my subscription. With it, the worker runs Claude headless:

claude -p --model sonnet --output-format json \
  --json-schema '{"type":"object","properties":{"title":…,"script":…,"notes_html":…}}' \
  --allowedTools WebFetch WebSearch

--json-schema returns an object with a title, the spoken script and HTML notes. The notes are what the podcast app shows under the episode, with a link for every story, since the audio doesn't read URLs. Allowing WebFetch/WebSearch is what lets Claude go after the newsletters that have no RSS.

An episode takes one to two minutes to get ready.

The voice

The first version used edge-tts, which is free and works well, but sounds like a screen reader. I switched to Google's Gemini TTS, which has a free quota with an AI Studio key and sounds like an actual person. You can even ask for a style: "like the host of a morning podcast, warm, unhurried". If the quota runs out, the worker falls back to edge-tts on its own, and as a last resort to Piper, which runs locally.

A good voice doesn't fix a bad script, so the prompt changed too: short sentences, casual Brazilian Portuguese, never reading lists, three items at most. And one detail that bugged me: it said times like "a quarter to four". Now the rule is to say the time like a digital clock, "three forty-five".

A feed only I know about

I thought about sending the audio over Telegram, but a podcast feed is better: the app downloads it on my home Wi-Fi before I leave and remembers where I stopped.

The feed lives at a URL with a random token in the path, https://…/<token>/feed.xml, and anyone without the token gets a 404. The XML carries itunes:block and noindex so it never shows up in any search. I use AntennaPod, which fetches the feed straight from the phone. Pocket Casts, Overcast and Apple Podcasts fetch it through their own servers.

Curitiba holidays

A business day is Monday to Friday, minus holidays. National ones come from BrasilAPI. The local ones I compute in the workflow itself: Our Lady of Light on September 8, and Corpus Christi and Ash Wednesday from Easter. Carnival doesn't count, since I work. And there is a list for personal days off.

Along the way I found out that December 19, Paraná's emancipation day, is not a holiday, just a commemorative date.

What took some work

  • Google OAuth: with the app in "Testing" mode, Google expires the token every seven days. To publish the app it asks for a home page and a privacy policy, so the worker itself serves both.
  • edge-tts: Microsoft changes the handshake from time to time and the library stops working (a 403 error). Updating the version fixes it, and that is why it became the fallback.
  • Testing on a Sunday: the workflow stops at "is it a business day?". I added a manual test trigger that skips that check and marks the episode as a test, so it doesn't move the "only what is new" cutoff.

If you want to build yours

The README has the step-by-step: run the worker, create the Claude token, expose the feed over HTTPS, import the workflow into n8n and set up the Google and TickTick credentials. You need a self-hosted n8n, a Claude subscription and a domain. Everything else is free.

I built it all in an afternoon, talking to Claude Code, which also wrote a good part of the worker. Tomorrow at 6:30 the first real episode comes out.