← Journey PHASE 4A — n8n core agents

Session Ingester: Claude Code Notes on Autopilot

A new n8n workflow catches Claude Code session endings and writes a structured note to Obsidian in under two minutes. No manual action required.

The session ingester workflow is live. When a Claude Code session ends on the Mac, a POST fires to an n8n webhook, qwen2.5:7b summarises the raw session dump, and the Obsidian REST API writes the note into 03-ai-sessions/. Wall-clock time from session end to note-in-vault: under two minutes.

Removed
Added
  • n8n-workflows/session-ingester.json
  • ~/scripts/session-to-n8n.sh

The Mac side is a shell script at ~/scripts/session-to-n8n.sh wired as a Claude Code Stop hook in ~/.claude/settings.json. On session end it finds the most recently modified JSONL under ~/.claude/projects/ via stat, extracts readable conversation turns via Python, and POSTs {project, session_id, content} to the n8n webhook. No daemon, no cron — just a hook that fires when the session closes.

On the n8n side: Webhook node receives the payload, an LLM node sends the transcript to qwen2.5:7b with a fixed summarisation prompt, and an HTTP Request node calls the Obsidian REST API to create the file. Frontmatter is templated in the LLM prompt itself so the note lands ready for the inbox classifier.

dani-brain
├─ 03-ai-sessions/ Landing folder for auto-generated session notes
└─ n8n-workflows/session-ingester.json new Exported workflow JSON

The workflow JSON is exported and committed to dani-brain/n8n-workflows/. That’s the pattern for every workflow from here: build in UI, export, commit.

What this unblocks. The inbox classifier workflow has real files to operate on now. Every session note lands with consistent frontmatter, which means the file-create trigger has a reliable schema to classify against. GitHub-to-vault sync can follow the same HTTP Request pattern already proven here.