diff --git a/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n IMAP Triage Pipeline.md b/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n IMAP Triage Pipeline.md index 545d300..1aeec62 100644 --- a/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n IMAP Triage Pipeline.md +++ b/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n IMAP Triage Pipeline.md @@ -3,7 +3,7 @@ title: n8n IMAP Triage Pipeline area: infrastructure tags: [n8n, imap, llm, automation, email] created: 2026-03-27 -updated: 2026-05-27 +updated: 2026-05-28 status: active related: [[Infrastructure/Automation/n8n Workflows]], [[Infrastructure/Architecture]] --- @@ -32,7 +32,8 @@ Read Unseen Emails ## Local LLM - **Model:** `gemma-4-26B-A4B-it-UD-IQ2_M.gguf` -- **Endpoint:** `http://127.0.0.1:18806/v1/chat/completions` or LAN `http://192.168.153.130:18806/v1/chat/completions` +- **Endpoint from n8n:** `http://172.19.0.1:18806/v1/chat/completions` +- **Endpoint from host:** `http://127.0.0.1:18806/v1/chat/completions` - **Used for:** ambiguous emails only - **Reply shape:** JSON like `{"signal": true|false, "priority": 1|2|3, "reason": "..."}` - **Priority scale:** @@ -65,10 +66,11 @@ Sent to the local LLM for judgement. - A major 2026-03-27 failure mode was **not** the LLM or the workflow logic — it was shared-vault cross-user permissions on the `virtiofs` mount. The API was up, but writes to some folders hung until permissions were fixed. - On 2026-05-27, intermittent Gandi IMAP long-lived connection resets (`ECONNRESET`) were mitigated by setting the `Read Unseen Emails` node option `forceReconnect` to `10` minutes and restarting `n8n-agent`. Because n8n 2.x uses published workflow versions, the current workflow version was also inserted into `workflow_history` and the active/published version pointers were aligned. Backups were written under `~/.hermes/backups/n8n-imap-*`. +- On 2026-05-28, `llama-server.service` was changed from `--host 127.0.0.1` to `--host 0.0.0.0` so Dockerized n8n can reach the host local LLM via the bridge gateway `172.19.0.1:18806`. Verified from inside `n8n-agent` with `/v1/models` and a chat-completions smoke test. If this breaks again, check the service is still listening on `0.0.0.0:18806` and not only loopback. - First checks if this breaks again: 1. Obsidian Local REST API reachable? 2. shared vault path writable from the current host user / Obsidian Local REST process? Older `claw`/`openclaw` VM ownership issues are historical. - 3. local LLM endpoint still serving `gemma-4-26B-A4B-it-UD-IQ2_M.gguf`? + 3. local LLM endpoint still serving `gemma-4-26B-A4B-it-UD-IQ2_M.gguf`, and reachable from `n8n-agent` at `http://172.19.0.1:18806/v1/models`? 4. IMAP trigger node still has `options.forceReconnect: 10`? ## Validation summary diff --git a/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n Workflows.md b/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n Workflows.md index 3a2c4c5..53fb7b4 100644 --- a/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n Workflows.md +++ b/swarm-common/obsidian-vault/will/will-shared-zap/Infrastructure/Automation/n8n Workflows.md @@ -3,7 +3,7 @@ title: n8n Workflows area: automation tags: [automation, integrations, n8n] created: 2026-03-18 -updated: 2026-05-12 +updated: 2026-05-28 status: active related: [[Infrastructure/Architecture]], [[Infrastructure/Automation/Cron Jobs]], [[Infrastructure/Services/Docker Services]], [[Infrastructure/Automation/n8n IMAP Triage Pipeline]], [[Infrastructure/Automation/n8n Nightly Vault Sync]] --- @@ -16,7 +16,7 @@ Running on `n8n-agent` at port `18808`. See [[Infrastructure/Services/Docker Ser - **n8n:** schedules, webhooks, polling, retries, credentials, native integrations, and lightweight HTTP/API glue. - **Atlas / Hermes:** reasoning-heavy decisions, debugging, code/config changes, workflow repair, and higher-quality synthesis. -- **Swarm local services:** cheap local LLM (`llama.cpp` on `18806`), embeddings (`Ollama` on `18807`), transcription (`Whisper` on `18811`), TTS (`Kokoro` on `18805`), and search (`SearXNG` on `18803`, Brave MCP on `18802`). +- **Swarm local services:** cheap local LLM (`llama.cpp` on host `0.0.0.0:18806`, reached from n8n as `http://172.19.0.1:18806`), embeddings (`Ollama` on `18807`), transcription (`Whisper` on `18811`), TTS (`Kokoro` on `18805`), and search (`SearXNG` on `18803`, Brave MCP on `18802`). - **Obsidian:** durable human-readable notes and summaries. - **Telegram / Discord:** notifications and quick approval loops. @@ -118,3 +118,4 @@ Running on `n8n-agent` at port `18808`. See [[Infrastructure/Services/Docker Ser - `n8n export:workflow --all` was re-verified on 2026-05-12 and exported 13 workflows successfully. - n8n health after recovery: `http://127.0.0.1:18808/healthz` returns `{"status":"ok"}` and the container is healthy. - Startup still logs the known Gmail Trigger warning (`undefined`) for `Gmail Inbox Monitor + Obsidian Notes`; this is the next cleanup target. +- On 2026-05-28, `llama-server.service` was rebound from `127.0.0.1:18806` to `0.0.0.0:18806` so n8n workflows can call the local LLM through the Docker bridge gateway at `172.19.0.1:18806`. Verification commands: host `curl http://127.0.0.1:18806/v1/models`; container `docker exec n8n-agent wget -qO- http://172.19.0.1:18806/v1/models`.