# Analyze Alertmanager incidents and post diagnostic reports: n8n workflow

> Started by another system calling it, and works across Mattermost and Qdrant. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from...

Source: https://millionrounds.com/workflow/analyze-alertmanager-incidents-and-post-diagnostic-reports (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Analyze Alertmanager incidents and post diagnostic reports

Started by another system calling it, and works across Mattermost and Qdrant. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 17 steps: a working afternoon to understand properly.

Medium Calls a model: Gemini, OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fanalyze-alertmanager-incidents-and-post-diagnostic-reports)

**17 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 8 Logic 5 Service 3

The steps in the order they run, from what starts it.

- 1 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 2 **Embeddings Google Gemini** Embeddings Google Gemini *Model*
- 3 **K8S mcp** Mcp Client Tool *Model*
- 4 **Grafana mcp** Mcp Client Tool *Model*
- 5 **Digitalocean MCP** Mcp Client Tool *Model*
- 6 **Github MCP** Mcp Client Tool *Model*
- 7 **Receive alerts** Webhook *Starts it*
- 8 **AI Agent** Agent *Model*
- 9 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 10 **SetVars** Set *Logic*
- 11 **GetAlertMessages** Http Request *Service*
- 12 **PreProcessAlerts** Code *Logic*
- 13 **FindAlert** Code *Logic*
- 14 **DeduplicateAlerts** Code *Logic*
- 15 **Post in thread** Mattermost *Service*
- 16 **GetAlertRule** Http Request *Service*
- 17 **ExtractRuleQuery** Code *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 17
- **Size:** Medium: a working afternoon
- **Connects to:** Mattermost, Qdrant
- **Model:** Gemini, OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Mattermost and Qdrant accounts, and a key for Gemini and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls Gemini and OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 17 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 17 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fanalyze-alertmanager-incidents-and-post-diagnostic-reports)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Mattermost](https://millionrounds.com/workflows?service=Mattermost#library)[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Analyze alerts from Alertmanager and send diagnostic reports** 14 steps · calls a model · Qdrant, Slack](https://millionrounds.com/workflow/analyze-alerts-from-alertmanager-and-send-diagnostic-reports)
- [**This is the best workflow ever created by the best creator ever** 8 steps · Linear, Mattermost](https://millionrounds.com/workflow/this-is-the-best-workflow-ever-created-by-the-best-creator-e)
- [**Notify on new document in Google Drive folder with Mattermost** 7 steps · Google Drive, Mattermost](https://millionrounds.com/workflow/notify-on-new-document-in-google-drive-folder-with-mattermos)
- [**Monitor changes in Google Sheets every 45 mins with Mattermost** 4 steps · Google Sheets, Mattermost](https://millionrounds.com/workflow/monitor-changes-in-google-sheets-every-45-mins-with-mattermo)
- [**Sample error workflow with Mattermost and Twilio** 3 steps · Mattermost, Twilio](https://millionrounds.com/workflow/sample-error-workflow-with-mattermost-and-twilio)
