Skip to content

Add optional n8n backend for Teams alert reports and replies - #4

Draft
JeffPengCoder wants to merge 9 commits into
feat/background-alert-investigationfrom
feat/n8n-teams-bridge-20261104
Draft

JeffPengCoder wants to merge 9 commits into
feat/background-alert-investigationfrom
feat/n8n-teams-bridge-20261104

Conversation

@JeffPengCoder

@JeffPengCoder JeffPengCoder commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Description

Add an optional n8n Teams backend to the alert-automation service. When selected, completed alert reports go to one fixed Teams DM, and the recipient's ordinary follow-up messages start a MOSAIC Agent turn with the complete report context. The native backend remains the default, with its configuration, credentials and persistent state retained for switching back.

Spark initiates HTTPS requests to two authenticated n8n workflows: send a message, and read replies at a configurable interval (30 seconds by default). n8n manages the approved Teams OAuth credential; MOSAIC retains investigation, conversation history, full-report context and durable deduplication. The workflow verifies the signed-in sender GUID and fixed recipient before creating or using their one-to-one chat. It neither sends n8n callbacks into Spark nor requires a Microsoft Teams Trigger callback.

The n8n backend uses a separate state directory and a View-only automation session. Complete messages are chunked without truncation, Graph message receipts are retained, and ambiguous outgoing sends are preserved for reconciliation instead of automatically retried. The generator exports two inactive workflows without credential values; approved OAuth and Header Auth credentials must be selected before publishing.

This is a stacked, code-only draft against the background-alert branch used by upstream #89. The base transport implementation and existing native deployment are retained separately. Enterprise n8n OAuth and actual Teams DM acceptance remain pending; local simulation is not reported as a real Teams delivery.

Validation

  • Full repository suite: 264 tests, 262 passed, 2 existing skips, 0 failures.
  • Dedicated backend/workflow coverage: 17 tests, including complete alert report delivery, ordinary DM follow-up, full report context restoration, native-context retention, peer isolation, pagination, restart deduplication, interrupted-run recovery and uncertain-send handling.
  • Actual n8n 2.46.6 engine: both generated workflows imported, activated and executed successfully against an isolated Microsoft Graph fixture; complete Unicode message round-trip and recipient-message read verified. No real Teams messages were sent. The temporary engine container was removed.
  • Both Helm charts linted; inference chart tests passed; documentation-bundle validation and git diff --check passed.
  • Scope audit: no documentation, repository-wide tooling, personal identifiers, credential values or deployment-specific configuration included.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Every commit is signed off under the Developer Certificate of Origin.
  • New or existing validation covers these changes.
  • Documentation is up to date with these changes. This is a code-only preview; operational documentation follows enterprise acceptance.

Upstream submission

Submitted as NVIDIA/AI-Factory-Operations-Agent #96. The upstream branch includes current main and resolves the installation-guide and generated-documentation conflicts. This draft retains the n8n-only comparison against the parent NVIDIA#89 branch.

…delivery

Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
@JeffPengCoder
JeffPengCoder force-pushed the feat/background-alert-investigation branch from fa0ccc8 to 8a33f32 Compare November 19, 2026 06:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant