IntegrationsAdvanced

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.

11 minAdvanced

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.

zsh - notes-summarizer
$npm init -y
$npm install @notionhq/client @anthropic-ai/sdk
added 24 packages in 3s
$

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.

summarize.mjs
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.

summarize.mjs
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.

summarize.mjs
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.");
Notion - Standup 2026-06-20
# Standup 2026-06-20
Raw notes... blocked on auth... shipped CSV export...
## AI Summary
The team shipped CSV export and is blocked on auth.
Action items:
- Pair on the auth fix
- Demo CSV export Friday
The AI summary appears at the bottom of the original page.
Cap the input size
Very long pages can blow past token limits. Truncate the text to the most recent sections or paginate the block list before sending it to the model.

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

Tags
#notion#claude#summarize#node