Agent.index

Work & Operations

Summarize newsletters into a Notion database

An n8n workflow retrieves newsletters, summarizes them with an LLM and stores them in Notion, splitting long summaries to fit block limits.

Done with n8n

What they did

The n8n workflow reads unread emails over IMAP, then filters by date and by a list of allowed senders. An OpenAI-backed summarization chain turns each remaining newsletter into bullet points that keep source URLs. Summaries over 1,950 characters are split by a code node. The first chunk creates the Notion page, and the later chunks are appended to that page by its URL.

How it went

In the walkthrough, 15 unread emails were narrowed to 3 summaries, all written to Notion. The author's multi-email chunking fix worked. The IMAP filter rules were unreliable, and the author chose the wrong summarization method at first.

Worth knowing

Only OpenAI ran reliably. Claude hit token limits mid-run after tokens were already spent, and local Llama2 errored. The author planned to switch from map-reduce to the simpler stuff method.

Try it yourself with n8n

Build an n8n workflow that pulls newsletters from my [email label or folder], summarizes each one with an AI model into a title, sender, 5 key bullets and a link, and saves them to my Notion database [database name]. If a summary is longer than Notion's block limit, split it across several blocks. You're done when a test run saves my last [number] newsletters correctly; show me the workflow before activating it.

Source

Read the original