← Back to blog
"n8nClaudeAIknowledge-management

Building a personal knowledge base with n8n and Claude: auto-tagging and routing notes without manual categorization

A personal knowledge base that self-organizes runs in n8n — capture from email, URL, or text, route through Claude for auto-tagging against a fixed taxonomy, and store in Notion or Obsidian. Heres the complete architecture.

The failure mode of most personal knowledge bases is the same: a folder called "Inbox" that accumulates 300 unsorted notes because tagging manually takes time you don't have in the moment. n8n and Claude solve this — capture fast, let the automation categorize, store in the right place.

Architecture

Four stages, runs on demand or continuously via webhook:

1. Capture — webhook accepts a POST with {title, content, source}, or an email trigger polls an inbox for starred messages

2. Claude tagging — system prompt defines your taxonomy; user prompt sends the note; Claude returns structured JSON with tags and a one-line summary

3. Routing — Switch node branches on the primary tag

4. Storage — each branch writes to the correct location (Notion database, Obsidian vault via git, Airtable row)

Defining your taxonomy

The taxonomy is the most important decision. Claude will match against whatever categories you define, so define them precisely. A working taxonomy for a solo operator:

`

Categories: project-notes, research, decisions, meeting-notes, inbox-processed,

reference, ideas, tools-and-software, process-documentation

`

System prompt:

`

You are a personal knowledge management assistant. Classify the following note

against this taxonomy: [category list]. Return JSON:

{"primary_tag": "category", "secondary_tags": ["cat1", "cat2"],

"summary": "one sentence", "action_required": true/false}

`

Secondary tags allow a note to live in one place but be findable from multiple contexts. action_required: true routes the note to a separate Todoist/Linear task creation step before storage.

Capture triggers

Webhook (recommended for quick capture): a mobile shortcut or browser bookmarklet posts to the n8n webhook URL. Fast enough to use mid-conversation. Store the webhook URL as a browser bookmark with a prefilled form.

Email trigger: poll a dedicated notes@yourdomain.com inbox. Forward interesting articles, paste URLs, send voice transcripts from your phone. The Email Trigger node strips headers; pass body + subject to Claude.

Manual HTTP Request node: for testing, call the webhook directly with { "content": "paste note here" }. Useful during taxonomy refinement.

Prompt caching

Your taxonomy and system prompt are static across all notes in a session. Add cache_control: {type: "ephemeral"} to the system prompt message block. For a batch of 50 notes, the prompt is cached after the first call — saves ~80% of token costs on the repeated calls.

Routing with the Switch node

After Claude returns the JSON, a Code node parses it and a Switch node branches on primary_tag. Each output connects to a different storage integration:

  • project-notes → Notion page in the Projects database, tagged with active project
  • research → Notion page in Research database with source URL
  • decisions → Notion page with date and reversibility field
  • ideas → Airtable row in the Ideas table (easier to triage)
  • reference → Obsidian via GitHub API commit to vault repo
  • Items with action_required: true go through a split before storage — one branch creates a task in your project tracker, the other stores the note.

    Storage integrations

    Notion: use the Notion node in n8n. Each database has a fixed schema — map Claude's JSON fields to Notion properties. The summary field becomes the page description; secondary_tags become a multi-select property.

    Obsidian via GitHub: if your vault is a git repo, use the GitHub API PUT endpoint to create a file. The file content is the note body; the path is {primary_tag}/{YYYY-MM-DD}-{slug}.md. Obsidian picks up the new file on next sync.

    Airtable: straightforward via the Airtable node. Useful for ideas that need voting/prioritization — Airtable's grid view makes triage faster than a Notion database.

    FAQ

    What if Claude assigns the wrong tag?

    Add a confidence field to the Claude response ({"confidence": "high/medium/low"}). Low-confidence items route to a review queue (Airtable or a Notion inbox) instead of being auto-filed. Review them weekly and use patterns to improve the taxonomy prompt.

    How do I handle images or PDFs?

    Pass the extracted text to Claude. For PDFs, a Code node using pdf-parse (npm module, self-hosted n8n) extracts text. For images with text, use an OCR step — a dedicated OCR API or Claude's vision capability via the HTTP Request node.

    Can I use this with Obsidian Sync instead of GitHub?

    Obsidian Sync doesn't expose a write API. The GitHub approach works if your vault is a git repo and you sync via the Obsidian Git plugin. Alternatively, write to a local folder on a server running Syncthing, which syncs to your Obsidian vault.