# Analyze failed workflows with Claude and OpenRouter: n8n workflow

> Started by an event in a connected app, and works across Discord, Gmail, Google Sheets and Slack. It hands the judgement calls to OpenRouter.

Source: https://millionrounds.com/workflow/analyze-failed-workflows-with-claude-and-openrouter (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 failed workflows with Claude and OpenRouter

Started by an event in a connected app, and works across Discord, Gmail, Google Sheets and Slack. It hands the judgement calls to OpenRouter. 14 steps: a working afternoon to understand properly.

Medium Calls a model: OpenRouter

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fanalyze-failed-workflows-with-claude-and-openrouter)

**14 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 1 Model 2 Logic 6 Service 5

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

- 1 **Error Trigger** Error trigger *Starts it*
- 2 **OpenRouter Chat Model1** Lm Chat Open Router *Model*
- 3 **Normalize Error Payload1** Set *Logic*
- 4 **AI Error Analysis1** Chain Llm *Model*
- 5 **Prepare AI Context1** Code *Logic*
- 6 **Extract AI Confidence** Code *Logic*
- 7 **Generate Error Signature** Code *Logic*
- 8 **Prepare Log Record** Set *Logic*
- 9 **Log to Google Sheets1** Google Sheets *Service*
- 10 **Check Alert Fatigue** Code *Logic*
- 11 **Send Email1** Gmail *Service*
- 12 **Send Slack Message1** Slack *Service*
- 13 **Send Discord Message1** Discord *Service*
- 14 **Webhook Notification1** Http Request *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 14
- **Size:** Medium: a working afternoon
- **Connects to:** Discord, Gmail, Google Sheets, Slack
- **Model:** OpenRouter

## Questions

What does it need to run?

An n8n account, plus your own Discord, Gmail, Google Sheets and Slack accounts, and a key for OpenRouter. 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 OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 14 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 14 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-failed-workflows-with-claude-and-openrouter)
- **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.

[Discord](https://millionrounds.com/workflows?service=Discord#library)[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

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

- [**AI-powered news monitoring & social post generator with OpenAI** 14 steps · calls a model · Google Sheets, RSS](https://millionrounds.com/workflow/ai-powered-news-monitoring-and-social-post-generator-with-op)
- [**Alert on at-risk nursery plants with OpenWeather** 14 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/alert-on-at-risk-nursery-plants-with-openweather)
- [**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)
- [**Analyze error logs with OpenAI and GitHub** 14 steps · calls a model · GitHub, Slack](https://millionrounds.com/workflow/analyze-error-logs-with-openai-and-github)
- [**Automate Twitter sentiment analysis with OpenAI** 14 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/automate-twitter-sentiment-analysis-with-openai)
- [**Automate dental appointments with Google Calendar** 14 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-dental-appointments-with-google-calendar)
