AOC v4 Enterprise is the flagship automation workflow in Bunker OS. It is a 37-node n8n pipeline that takes an incoming webhook event and walks it through the full operational lifecycle: payload validation, Redis-based deduplication, AI triage via OpenRouter, GitHub issue creation, human-in-the-loop routing for review cases, emergency fast-path for critical events, parallel multi-channel notification delivery, and a final audit write. It ships as Inactive — you must configure credentials and activate it manually.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SamBleed/opencode-obsidian/llms.txt
Use this file to discover all available pages before exploring further.
Full Pipeline
Pipeline Stages
Each of the 37 nodes belongs to one of eight functional stages. Understanding the stages helps when debugging a failed execution in the n8n UI.1. Ingress Guard
The first node validates the incoming webhook payload before any processing begins. It checks that required fields are present and that the payload structure is well-formed. Invalid payloads receive aRejected Response immediately — they never reach Redis or the AI triage step.
2. Redis Idempotency
Every valid event is checked against a Redis key derived from the event’s unique identifier. If the key exists, the event has already been processed and aCached Response is returned without re-executing the pipeline. This prevents duplicate GitHub issues and duplicate notifications when webhooks are replayed.
3. AI Triage (OpenRouter)
The core intelligence step. The normalized event payload is sent to OpenRouter, which classifies it into one of four categories:| Decision | Meaning |
|---|---|
| Create | A new GitHub issue should be opened |
| Review | The event needs human judgment before action |
| Emergency | Critical event requiring immediate escalation |
| Duplicate | A semantically equivalent issue already exists |
4. Parse AI Decision
Extracts the structured decision from the OpenRouter response and routes the execution to the correct downstream branch. This node normalizes model output variations so the branching logic remains stable even if the model changes.5. GitHub Issue Creation
ForCreate-classified events, this node opens a GitHub issue using the configured GitHub credentials. The issue title, body, and labels are populated from the event payload and the AI triage output.
6. HITL (Human in the Loop)
ForReview-classified events, execution is paused and a notification is sent to the configured channel requesting human input before the pipeline continues. The HITL pattern prevents fully automated action on ambiguous or high-stakes events.
7. Emergency Queue
ForEmergency-classified events, the pipeline takes a fast path that bypasses normal queuing and delivers an immediate high-priority alert to all configured notification channels simultaneously.
8. Multi-Channel Notifications
After GitHub issue creation, HITL, or Emergency Queue, the pipeline builds a notification payload and fans it out in parallel to up to three channels. Each channel is conditional — if the credential is not configured, that branch is skipped cleanly.| Channel | Credential Required |
|---|---|
| Slack | Slack bot token |
| Telegram | Telegram bot token + chat ID |
| Discord | Discord webhook URL |
9. Write Audit
Every execution — regardless of which branch was taken — writes a full audit record containing the original event, the AI decision, the GitHub issue URL (if created), and the notification delivery status. This audit trail is queryable in the n8n executions view.10. Final Status
Returns a structured200 OK response to the original webhook caller with the execution summary.
Required Configuration
Before activating AOC v4 Enterprise, configure the following credentials in n8n Settings → Credentials:| Credential | Required | Purpose |
|---|---|---|
| OpenRouter API key | ✅ Yes | AI triage classification |
| GitHub credentials | ✅ Yes | Automated issue creation |
| Discord webhook URL | ✅ Yes | Default notification channel |
| Redis connection | ✅ Yes | Event deduplication |
| Slack bot token | ☐ Optional | Slack notifications |
| Telegram bot token + chat ID | ☐ Optional | Telegram notifications |
Activating the Workflow
Configure your .env
Edit
automation/n8n-lab/.env and add the variable placeholders for your environment. The .env file is gitignored — never commit credentials.Add credentials in the n8n UI
In n8n go to Settings → Credentials → Add Credential and create entries for each service. n8n encrypts these at rest in the credential vault. Reference the credential names in the workflow nodes — the workflow JSON ships with placeholder credential names that you replace at this step.
Import the workflow JSON
In n8n go to Workflows → Import from file and select the AOC v4 Enterprise JSON from
automation/n8n-lab/workflows/. The workflow will appear in your list as Inactive.Activate the Dead Letter Queue first
Before activating AOC v4, activate the Dead Letter Queue workflow. The DLQ will catch any errors from AOC v4 during initial testing. See Dead Letter Queue for setup steps.
Monitoring Executions
After activating, every incoming webhook creates an execution record in n8n. Access them via Executions in the left sidebar. Each execution shows:- The full input payload
- Which branch was taken (Create / Review / Emergency / Duplicate)
- Individual node output at every step
- Any errors with full stack traces
Related Pages
n8n Overview
Infrastructure setup, Docker compose, and the full workflow inventory.
Dead Letter Queue
Activate the DLQ before AOC v4 to capture errors during setup.
MCP Bridge
Trigger AOC v4 from OpenCode skills via the n8n MCP bridge.