Automation library · Chat assistants

Triage DevOps incidents from Slack with OpenAI and Prometheus

Started by an event in a connected app, and works across GitHub, Jira, Postgres and Slack. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 23 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

23 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
1Loop or waits
4Services it connects to

The flow

Starts it 1Model 6Logic 6Service 10

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

  1. 1Slack - Incident TriggerSlack triggerStarts it
  2. 2Tool - Query PrometheusTool Http RequestModel
  3. 3Tool - Query LokiTool Http RequestModel
  4. 4Tool - RAG Search Past IncidentsTool Vector StoreModel
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6Window Buffer MemoryMemory Buffer WindowModel
  7. 7Set - ConfigSetLogic
  8. 8AI Agent - Incident InvestigatorAgentModel
  9. 9Set - Parse Agent OutputSetLogic
  10. 10Postgres - Log Incident AnalysisPostgresService
  11. 11IF - Remediation ProposedIfLogic
  12. 12Slack - Request Human ApprovalSlackService
  13. 13Slack - Post Investigation NoticeSlackService
  14. 14Wait - For Human ApprovalWaitLogic
  15. 15IF - ApprovedIfLogic
  16. 16Switch - Ticketing SystemSwitchLogic
  17. 17Slack - Post Rejection NoticeSlackService
  18. 18Jira - Create Incident Ticket (optional)JiraService
  19. 19GitHub - Create Incident Issue (optional)GithubService
  20. 20Terraform - Apply RemediationHttp RequestService
  21. 21Prometheus - Verify ResolutionHttp RequestService
  22. 22Grafana - Annotate DashboardHttp RequestService
  23. 23Slack - Post Resolution SummarySlackService

How it's built

Starts on
An event in a connected app
Steps
23, with 3 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
GitHub, Jira, Postgres, Slack
Model
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 GitHub, Jira, Postgres and Slack accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls 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?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

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 23 steps before you point it at anything that matters.