How to Auto-Summarize Notion Meeting Notes With an AI Script
Pull a meeting page from Notion, send it to Claude for a summary, and write the result back as a new block.
Long meeting notes are useful only if someone reads them. This guide builds a small Node script that fetches a Notion page, sends the text to Claude for a tight summary with action items, and appends the summary back onto the same page. It assumes you already have a Notion token and a Claude API key.
- Node 18 or newer
- A Notion integration token shared with the page
- An Anthropic API key for Claude
- The page id of a meeting notes page
Step 1: Install the SDKs
Use the official clients for both services so you do not hand-roll request signing. Initialize a project first if you do not have one.
Step 2: Read the page text from Notion
Notion stores page content as blocks. List the children of the page and flatten the paragraph and heading text into a single string you can hand to the model.
import { Client } from "@notionhq/client";
import Anthropic from "@anthropic-ai/sdk";
const notion = new Client({ auth: process.env.NOTION_TOKEN });
const claude = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
const pageId = process.env.NOTION_PAGE_ID;
const { results } = await notion.blocks.children.list({ block_id: pageId });
const text = results
.flatMap((b) => b[b.type]?.rich_text ?? [])
.map((t) => t.plain_text)
.join("\n");Step 3: Ask Claude for a summary
Send the flattened text to the Messages API with a clear instruction. Asking for a fixed shape, such as a short paragraph plus bullet action items, makes the output easy to write back cleanly.
const msg = await claude.messages.create({
model: "claude-sonnet-4-5",
max_tokens: 600,
messages: [
{
role: "user",
content:
"Summarize these meeting notes in 3 sentences, then list action items as bullets:\n\n" +
text,
},
],
});
const summary = msg.content[0].text;Step 4: Write the summary back to Notion
Append a heading and a paragraph block to the same page so the summary lives next to the raw notes. Run the script and the page updates in place.
await notion.blocks.children.append({
block_id: pageId,
children: [
{
heading_2: { rich_text: [{ text: { content: "AI Summary" } }] },
type: "heading_2",
object: "block",
},
{
paragraph: { rich_text: [{ text: { content: summary } }] },
type: "paragraph",
object: "block",
},
],
});
console.log("Summary written to page.");Result: every time you run the script, the chosen page gains a fresh AI Summary section. Schedule it after recurring meetings and your notes stay readable with zero manual effort.
Watch related tutorials
1:42:18
28:14
41:09
9:47
8:23
52:31