n8n Workflow Automation
n8n is the orchestration engine that connects every external data source to the PostgreSQL database, runs AI enrichment pipelines, delivers notifications, and executes automated actions. It is the glue between the data layer and everything else.
Version: 2.14.2
Container: chris-os-n8n
Total workflows: 80 (78 active, 2 inactive)
External access: https://n8n.ataraxis.cloud (Authelia SSO)
MCP access: Dedicated Cloudflare Tunnel MCP endpoint
Workflow Categories
Section titled “Workflow Categories”Data Ingestion (18 active, 1 inactive)
Section titled “Data Ingestion (18 active, 1 inactive)”Workflows that pull external data into PostgreSQL.
| Workflow | Trigger | Source |
|---|---|---|
| Gmail: Push Notification Receiver | Webhook (Pub/Sub) | Gmail API |
| Calendar: Push Notification Receiver | Webhook (Pub/Sub) | Google Calendar API |
| iMessage: BlueBubbles Webhook Receiver | Webhook | BlueBubbles server (local) |
| WhatsApp: WAHA Webhook Receiver | Webhook | WAHA server (local) |
| Discord Classifier Pipeline | Webhook | Discord bridge |
| Health Auto Export Ingestion | Webhook | iOS Health Auto Export app |
| HA: Event Receiver | Webhook | Home Assistant (iCloud3, state changes) |
| HA: Voice Interaction Receiver | Webhook | Home Assistant voice pipeline |
| Peak State: Real-Time Signals | Webhook | Health Auto Export / HA |
| Peak State: Nightly Signals | Schedule + Webhook | Aggregated from health tables |
| Peak State: Weekly Signals | Schedule + Webhook | Aggregated from health tables |
| Peak State: Signal Extraction | Schedule + Webhook | health_records, ha.events |
| Brewer’s Friend Sync | Schedule + Webhook | Brewer’s Friend API |
| Memory Bridge: Amazon Orders Sync | Schedule | Postgres / Amazon order tables |
| Spotify: Daily Play Sync | Schedule + Webhook | Spotify API |
| UniFi: Device & Client Sync | Schedule (30s) | UniFi controller API |
| Weather Daily Sync | Schedule (6 AM) | Open-Meteo API |
| Weather: Fetch & Store | Schedule | Open-Meteo + NWS fallback |
| GitHub Webhook Sync | Webhook | GitHub webhooks |
| Monarch Money: Daily Transaction Sync | Schedule | Monarch Money API (INACTIVE) |
Memory / AI (21 workflows)
Section titled “Memory / AI (21 workflows)”Workflows that build, maintain, and query the knowledge graph and memory server.
| Workflow | Schedule | Function |
|---|---|---|
| Memory: Auto-Store via MCP | Webhook | Receive and forward memory payloads to MCP server |
| Memory: Daily Maintenance | Schedule (4 AM) | Decay, prune, index optimization |
| Memory: Enhanced Maintenance | Schedule + Webhook | Embedding refresh, cache invalidation |
| Memory: TTL Expired Cleanup | Schedule (2:30 AM) | Delete expired episode-type entries |
| Memory: Nightly Contradiction Detection | Schedule (11 PM) | Scan for contradictions across memory |
| Memory: Stale Decision Scanner (Weekly) | Schedule (Mon 6 AM) | Flag old unactioned decisions |
| Memory: Weekly Pattern Analysis | Schedule + Webhook | Surface behavioral patterns |
| Entity Extraction: Real-Time (pg_notify) | pg_notify | Real-time entity extraction from new messages |
| Entity Extraction v2: Knowledge Graph Builder | Schedule + Webhook | Batch entity extraction |
| Entity Auto-Tagger | Schedule | Auto-tag untagged entities |
| Entity Consolidation Weekly | Schedule (Sun noon) | Merge duplicate entities |
| Entity Relationship Inference | Schedule + Webhook | Infer entity graph edges |
| Aegis: Fact Verification | Schedule + Webhook | Verify claims in claim_registry |
| Aegis: Synthesis Quality Gate | Schedule + Manual | Score AI synthesis outputs |
| Heart Demon: Claim Verification | Schedule + Webhook | Adversarial claim stress-testing |
| Identity Crystallization: Aegis Phase 4d | Schedule + Webhook | Crystallize identity signals |
| Counter-Narrative Generator | Schedule + Webhook | Generate cognitive blind-spot challenges |
| Pattern Weaving: Cross-Domain Synthesis | Schedule + Webhook | Cross-domain pattern synthesis |
| Cornerstone Signal Extraction | Schedule | Extract Cornerstone Discovery signals |
| Cornerstone: Answer Processor | Webhook | Process Cornerstone question answers |
| Cornerstone: Weekly Synthesis | Schedule + Manual | Weekly identity narrative |
| Lesson Matcher: Daily Trigger Evaluation | Schedule | Surface relevant past lessons |
| Time Insights: Daily Activity Summary | Schedule + Manual | Daily summary from time_blocks |
Monitoring (11 workflows)
Section titled “Monitoring (11 workflows)”Workflows that observe system health and fire alerts.
| Workflow | Schedule | What It Watches |
|---|---|---|
| Global: Error Notification | n8n error trigger | All n8n workflow failures |
| Alerts: Proactive Monitor | Schedule + Manual | GitHub issues, internal state conditions |
| Backup Freshness Monitor | Schedule | Backup timestamps in Postgres |
| Data Freshness Monitor | Schedule | Ingestion recency across all pipeline tables |
| Peak State: Signal Staleness Alert | Schedule + Manual | Peak State update recency |
| GLaDOS: Framework Telemetry Receiver | Webhook | GLaDOS hook events |
| Nightwatch: Job Alerting | Webhook | nightwatch job completion/failure |
| Reportcard Snapshot (Automated) | Every 15 min | System health scores |
| System State: Canary Query Checker | Schedule | config_registry canary queries |
| System State: Collector | Schedule | Container health, service endpoints, DB row counts |
| System State: Health Checks | Schedule | HA, NAS, atlas, nightwatch, Loki, Grafana |
Communication (9 workflows)
Section titled “Communication (9 workflows)”Workflows that generate and deliver human-facing outputs.
| Workflow | Schedule | Output |
|---|---|---|
| Morning Briefing | Schedule (7 AM) + Manual + Webhook | Morning briefing document in Postgres |
| Morning Briefing Push | Schedule (6:15 AM PT) + Manual | Pushover / PWA push notification |
| Morning Council: Data Gather & Synthesis | Schedule (3:45 AM) | Pre-synthesized Council data |
| Session: Haiku Summarization | Webhook | Session summary in session_summaries |
| Daily Summary Generation | Schedule (10 PM) | Daily narrative in documents |
| Health Nudge Triggers | Schedule (9:30 AM) | Pushover health nudge notifications |
| GitHub: Discord Notifier | Webhook | Claude-formatted summary to Discord |
| M: Conversation Handler | Webhook | M voice persona conversation responses |
| Therapy: Session Prep Generator | Schedule + Manual + Webhook | Therapy prep document (Tier 2 data only) |
Automation (9 workflows)
Section titled “Automation (9 workflows)”Workflows that perform actions in response to user or system requests.
| Workflow | Trigger | Action |
|---|---|---|
| Backlog: Natural Language Issue Creator | Webhook | Parse NL text -> GitHub issue -> project board |
| Assistant: Write-Back Actions | Webhook | Apply dashboard write-backs to Postgres |
| Calendar: Auto-Manage from Emails | Webhook | Create/update calendar events from classified emails |
| Council: Deliberation Engine | Webhook + Manual | Run multi-perspective Council deliberation |
| Dispatch: Action Webhook Receiver | Webhook | Execute commands on infrastructure hosts |
| Document: Create Document | Webhook | Create document in documents table |
| Facility Intercom: Command Handler | Schedule | Route intercom commands to facility subsystems |
| Review Queue: Action Handler | Webhook | Process review queue actions from dashboard |
| Cornerstone: Question Delivery | Schedule + Manual | Deliver Cornerstone questions to dashboard |
Maintenance (7 workflows)
Section titled “Maintenance (7 workflows)”Workflows that keep data and infrastructure clean.
| Workflow | Schedule | Function |
|---|---|---|
| Google: Push Watch Renewal | Every 4h | Renew Gmail + Calendar Pub/Sub subscriptions |
| GitHub: Project Board Sync | Schedule + Manual | Sync Projects V2 state to Postgres |
| Maintenance: Matview Refresh | Multiple schedules (5 AM+) | Refresh all PostgreSQL materialized views |
| Priority Score Refresh | Schedule (3:15 AM) | Recalculate issue priority scores |
| Relationship Score Refresh | Schedule + Manual | Recalculate contact relationship health scores |
| Document Staleness Scanner | Schedule | Flag stale/unreviewed documents |
| Email: Unsubscribe Scanner | Schedule + Manual | Queue unsubscribe candidates for review |
Key Workflow Chains
Section titled “Key Workflow Chains”Morning Pipeline
Section titled “Morning Pipeline”The morning briefing is assembled from pre-gathered data to keep the 7 AM generation fast.
3:15 AM Priority Score Refresh3:45 AM Morning Council: Data Gather & Synthesis5:00 AM Maintenance: Matview Refresh6:00 AM Weather Daily Sync6:15 AM Morning Briefing Push (triggers generation + sends notification)7:00 AM Morning Briefing (reads pre-assembled Council data + daily summary)Gmail Push Pipeline
Section titled “Gmail Push Pipeline”Gmail (Pub/Sub) -> Gmail: Push Notification Receiver -> writes: messages table -> Calendar: Auto-Manage from Emails (if calendar-type classification)Entity Extraction Pipeline
Section titled “Entity Extraction Pipeline”INSERT on messages / social_messages -> pg_notify trigger -> Entity Extraction: Real-Time (pg_notify) -> writes: entities, entity_relations
Entity Extraction v2 (batch, scheduled) -> Entity Auto-Tagger -> Entity Consolidation Weekly (dedup pass) -> Entity Relationship Inference (edge inference)Health Ingestion Pipeline
Section titled “Health Ingestion Pipeline”iOS Health Auto Export -> Health Auto Export Ingestion -> writes: health_records -> Peak State: Real-Time Signals -> Peak State: Signal Extraction -> Peak State: Nightly Signals -> Peak State: Weekly SignalsAegis / Memory Pipeline
Section titled “Aegis / Memory Pipeline”Identity Crystallization: Aegis Phase 4d -> reads: Aegis pipeline outputs -> Cornerstone Signal Extraction (feeds signals)
Aegis: Fact Verification -> reads: claim_registry -> Heart Demon: Claim Verification (parallel adversarial pass)Claude API Usage
Section titled “Claude API Usage”14 workflows use Claude for classification, generation, and analysis:
- Email classification: Gmail Push Receiver (Haiku 4.5)
- Calendar intent: Calendar: Auto-Manage from Emails
- Entity extraction: Entity Extraction (real-time and batch)
- Contradiction detection: Memory: Nightly Contradiction Detection
- Claim verification: Heart Demon: Claim Verification (adversarial)
- Identity synthesis: Identity Crystallization, Cornerstone Signal Extraction
- Pattern analysis: Pattern Weaving, Counter-Narrative Generator
- Content generation: Morning Briefing, Daily Summary Generation, Session Summarization
- Issue parsing: Backlog: Natural Language Issue Creator
- Message formatting: GitHub: Discord Notifier
Docker Configuration
Section titled “Docker Configuration”Image: docker.n8n.io/n8nio/n8n:2.14.2Database: Dedicated n8n Postgres database (n8n_role)Networks: net-app, net-data, net-monitoringKey environment variables:
| Variable | Purpose |
|---|---|
N8N_BLOCK_ENV_ACCESS_IN_NODE=false | Required for $env in Code nodes |
N8N_PAYLOAD_SIZE_MAX | 50MB limit for Health Auto Export payloads |
NODE_FUNCTION_ALLOW_BUILTIN=crypto | Timing-safe API key comparison in Code nodes |
N8N_WEBHOOK_TTL | 5-minute webhook timeout |
| V8 heap cap | Contains known n8n memory leak |
API Behavior
Section titled “API Behavior”Updating Workflows
Section titled “Updating Workflows”When updating a workflow via the n8n API, the PUT body must include only four fields:
{ "name": "...", "nodes": [...], "connections": {...}, "settings": {...}}Any other fields (id, tags, etc.) will cause the request to fail.
Activate/deactivate: POST /api/v1/workflows/{id}/activate or /deactivate. NOT PATCH.
Multi-Statement SQL
Section titled “Multi-Statement SQL”n8n Postgres nodes execute queries as prepared statements. Multiple statements in a single node will fail. Wrap multi-statement SQL in a function.
Gotchas
Section titled “Gotchas”Inactive Workflows
Section titled “Inactive Workflows”| Workflow | Reason |
|---|---|
| Brewery: Fermentation Monitor | Superseded by Brewer’s Friend Sync |
| Monarch Money: Daily Transaction Sync | Auth issue with Monarch Money API |
Related Scripts
Section titled “Related Scripts”| Script | Purpose |
|---|---|
scripts/verify/verify-n8n-workflow.sh | Trigger a workflow via API, poll for completion, output JSON pass/fail evidence |
scripts/maintenance/gitops-converge.sh | References n8n as part of infrastructure convergence |
scripts/dispatch/mission-dispatch.sh | Dispatches to n8n workflows via webhook |
Export workflow artifacts: make n8n-export
Workflow JSON files in n8n/workflows/*.json are version-controlled export artifacts. Edit workflows via the n8n UI or MCP only — never edit the JSON files directly.