Skip to content

Vault Capture V2 Plan

Created 2026-02-21
Updated 2026-02-21
Status ready-to-implement
Tags agent-systemn8nvault-capturesimplification

Vault Capture V2 — Simplified Workflow Plan

Section titled “Vault Capture V2 — Simplified Workflow Plan”

Read the Deployment Log first for full system state: 03-resources/agent-system/docs/Deployment-Log.md

The current Vault Capture workflow routes Slack messages through CrewAI (a separate Docker container running Python/FastAPI). This takes ~2.5 minutes per execution, required 5 bug fixes to get working (monkey-patched litellm, model ID corrections, assistant prefill workarounds), and has 6 failure points in the chain.

Replace the CrewAI call with n8n’s built-in AI Agent node, which can call Claude directly via OpenRouter. No Python, no extra container, no monkey-patches. Expected execution time: ~5-10 seconds.


  • n8n version: 2.8.3
  • Docker containers: baseworks-n8n, baseworks-postgres, baseworks-crewai
  • OpenRouter API key: already in .env on VPS
  • Existing Vault Capture workflow ID: A0hTmPJN38HRe3Ch (ACTIVE)
  • Slack Event Router workflow ID: fcsJFL21APR2uyV9 (ACTIVE)
  • Slack channel #vault-inbox ID: C0AG0MWBP5L
  • NODES_EXCLUDE=[n8n-nodes-base.localFileTrigger] already set (Execute Command node enabled)
  • Vault path on VPS: /opt/baseworks-vault
  • Vault ownership: chown -R 1000:1000 /opt/baseworks-vault (already done)

Build this as a NEW workflow (don’t modify the existing one yet). Keep both active during testing, then deactivate the old one once v2 is confirmed working.

1. Webhook Trigger
- Method: POST
- Path: /vault-capture-v2
- (The Slack Event Router will be updated to point here after testing)
2. Extract Message (Set node)
- Input: {{ $json.body.message }} (from the existing Vault Capture workflow's format)
- Strip Slack mrkdwn formatting: remove _, *, ~ characters
- Extract sender: {{ $json.body.sender }}
- Output fields: cleaned_message, sender, timestamp
3. AI Agent Node (Tools Agent)
- Chat Model: OpenRouter Chat Model sub-node
- Credential: OpenRouter API key (create new credential in n8n)
- Model: anthropic/claude-sonnet-4.6
- Temperature: 0.3 (low for consistent classification)
- Max Tokens: 1024
- No memory needed (stateless, one-shot classification)
- No tools needed (all context is in the system prompt)
- System Prompt: (see below)
- User Prompt: "Classify and file this message from {{ $json.sender }}:\n\n{{ $json.cleaned_message }}"
4. Post Filing Suggestion to Slack (Slack node)
- Channel: #vault-inbox (C0AG0MWBP5L)
- Credential: existing "Slack account" credential
- Message: Filing suggestion with folder, filename, reason, and tags
5. Write File & Git Push (Execute Command node)
- Write the markdown file with frontmatter to the chosen folder
- Git add, commit, push
You are the Baseworks vault filing assistant. Your job is to classify an incoming message and determine where it should be saved in the Obsidian vault.
## Vault Structure (PARA method)
00-inbox/ — Quick capture, unsorted notes (DEFAULT if unclear)
01-projects/ — Active projects with defined outcomes
02-areas/
communications/ — Response policies, email templates, FluentCRM
community-forums-groups/ — Forum posts, DMs, group feed responses
educational-programs/ — Study groups, labs, events
method-admin/ — Internal methodology docs, science, taxonomy
practice-platform/ — Online platform content
primer/ — 10-segment course (transcripts, summaries)
website/ — Blog articles, main pages
collaborations/ — External partnerships
03-resources/ — Reference material, guides, agent system
04-archive/ — Completed/inactive items
## Filing Rules
- Use kebab-case filenames: YYYY-MM-DD-descriptive-slug.md
- Forum posts or community discussion notes go in: 02-areas/community-forums-groups/
- Method/technique/movement notes go in: 02-areas/method-admin/
- Program/course/event content goes in: 02-areas/educational-programs/
- Communication templates or policies go in: 02-areas/communications/
- Website content ideas go in: 02-areas/website/
- External partnership notes go in: 02-areas/collaborations/
- Platform/tech notes go in: 02-areas/practice-platform/
- Reference material, guides, how-tos go in: 03-resources/
- If uncertain or it's a quick thought, file to 00-inbox/ (safe default)
- Always include frontmatter: created (today's date), updated (today's date), tags (relevant keywords)
## Your Response
Return ONLY valid JSON, no markdown fencing, no explanation:
{"folder":"02-areas/method-admin/","filename":"2026-02-21-descriptive-slug.md","tags":["tag1","tag2"],"filing_reason":"One sentence explaining why this folder","title":"Human-Readable Note Title"}

The Execute Command node should run something like:

Terminal window
FOLDER="{{ $json.output.folder }}"
FILENAME="{{ $json.output.filename }}"
TITLE="{{ $json.output.title }}"
TAGS="{{ $json.output.tags }}"
MESSAGE="{{ $json.cleaned_message }}"
DATE=$(date +%Y-%m-%d)
mkdir -p /opt/baseworks-vault/$FOLDER
cat > /opt/baseworks-vault/$FOLDER/$FILENAME << 'VAULTEOF'
---
created: $DATE
updated: $DATE
tags: [$TAGS]
source: slack-capture
---
# $TITLE
$MESSAGE
VAULTEOF
cd /opt/baseworks-vault && git add "$FOLDER/$FILENAME" && git commit -m "vault-capture: $FILENAME" && git push

Note: The exact expression syntax for extracting the AI Agent’s JSON response will need to be worked out in the n8n UI. The AI Agent node returns its output in {{ $json.output }} or {{ $json.text }} depending on configuration. Parse the JSON response to extract folder, filename, tags, etc.

After testing v2 with manual webhook calls, update the Slack Event Router workflow (fcsJFL21APR2uyV9) to route #vault-inbox messages to the new webhook URL (/webhook/vault-capture-v2) instead of the old one.


  1. Create the OpenRouter credential in n8n (Settings → Credentials → Add → OpenRouter)
  2. Build the workflow in n8n UI
  3. Test with manual webhook call (curl or n8n test execution)
  4. Compare output with the existing Vault Capture workflow
  5. Test from Slack by updating the Event Router to point to v2
  6. Verify file appears in /opt/baseworks-vault/ and is pushed to GitHub
  7. If everything works: deactivate old Vault Capture workflow (A0hTmPJN38HRe3Ch)

  • Don’t remove the CrewAI container — it may still be needed for Content Creation and Forum Response workflows
  • Don’t modify the existing Vault Capture workflow — build v2 as a separate workflow
  • Don’t deactivate the Slack Event Router — it serves multiple workflows

Since n8n 1.78+ (your version 2.8.3 qualifies), there’s a native OpenRouter Chat Model sub-node:

  1. In n8n UI: Settings → Credentials → Add Credential
  2. Search for “OpenRouter”
  3. Paste the OpenRouter API key (same one already in the VPS .env file — retrieve it with grep OPENROUTER /opt/baseworks-vault/03-resources/agent-system/docker/.env on the VPS)
  4. Save

Then in the AI Agent node, add the OpenRouter Chat Model sub-node and select anthropic/claude-sonnet-4.6 from the model dropdown.


There’s a reported issue (Jan 2026) where the n8n AI Agent node fails when tools are attached to OpenRouter in some configurations. Since this workflow doesn’t need any tools (all context is in the system prompt), this shouldn’t affect us. But if issues arise, the fallback is to use the OpenAI Chat Model sub-node with a custom base URL (https://openrouter.ai/api/v1) and set the model as an expression.