{
  "id": "5qAvHvNoUMIxsFG7",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "ErrorFlow SlackAlarm",
  "tags": [],
  "nodes": [
    {
      "id": "f809d48f-3378-4559-a928-8b9719b65706",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d31eb570-9fd9-459d-b7b0-88c7b13d569c",
      "name": "SETUP INSTRUCTIONS",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -280
      ],
      "parameters": {
        "width": 400,
        "height": 3200,
        "content": "# \ud83d\udea8 ERROR-MONITORING FLOW \u2014 SLACK SETUP GUIDE  \n\n\ud83d\udd17 Jump to language:  \n\ud83c\uddec\ud83c\udde7 [English](#-english) | \ud83c\uddea\ud83c\uddf8 [Espa\u00f1ol](#-espa\u00f1ol) | \ud83c\udde9\ud83c\uddea [Deutsch](#-deutsch) | \ud83c\uddeb\ud83c\uddf7 [Fran\u00e7ais](#-fran\u00e7ais) | \ud83c\uddf7\ud83c\uddfa [\u0420\u0443\u0441\u0441\u043a\u0438\u0439](#-\u0440\u0443\u0441\u0441\u043a\u0438\u0439)  \n\n---\n\n> \u2757 This workflow must remain **INACTIVE**.  \n> You should select it as the **Error Workflow** inside other workflows where you want to receive error alerts.\n\n---\n\n## \ud83c\uddec\ud83c\udde7 English\n\n1. Create a Slack App at [api.slack.com/apps](https://api.slack.com/apps)  \n   - Click **\"Create New App\"** \u2192 **From scratch**  \n   - Name it (e.g. `n8n Error Bot`) and choose your Slack workspace  \n\n2. Go to **OAuth & Permissions** and add the following Bot Token Scope:  \n   - `chat:write`\n\n3. Click **\"Install App to Workspace\"**, then approve the permissions.\n\n4. Add the bot to the desired Slack channel (e.g. `#notification`):  \n   - In Slack, type `/invite @your_bot_name`\n\n5. In n8n, open the **Send Reply** node:  \n   - Select your Slack credentials  \n   - Set **channel name** (e.g. `notification`)  \n   - Message text is preconfigured as:  \n     ```\n     {{$json.execution.error.message}}\n     ```\n\n6. Save the workflow but **do not activate it**.\n\n7. In your other workflows \u2192 open **Settings** \u2192 select this as **Error Workflow**.\n\n---\n\n## \ud83c\uddea\ud83c\uddf8 Espa\u00f1ol\n\n> \u2757 Este flujo debe permanecer **INACTIVO**.  \n> Debes seleccionarlo como **Error Workflow** en otros flujos.\n\n1. Crea una app de Slack en [api.slack.com/apps](https://api.slack.com/apps)  \n   - Haz clic en **\"Create New App\"** \u2192 **From scratch**  \n   - Ponle un nombre y elige tu espacio de trabajo  \n\n2. En **OAuth & Permissions**, a\u00f1ade el scope:  \n   - `chat:write`\n\n3. Haz clic en **\"Install App to Workspace\"** y acepta los permisos.\n\n4. A\u00f1ade el bot al canal deseado (`#notification`):  \n   - Escribe `/invite @nombre_de_tu_bot` en Slack\n\n5. En n8n, abre la nodo **Send Reply**:  \n   - Selecciona las credenciales  \n   - Canal: `notification`  \n   - El mensaje est\u00e1 listo:  \n     ```\n     {{$json.execution.error.message}}\n     ```\n\n6. Guarda el flujo pero **no lo actives**.\n\n7. En otros flujos \u2192 **Settings** \u2192 elige este como **Error Workflow**.\n\n---\n\n## \ud83c\udde9\ud83c\uddea Deutsch\n\n> \u2757 Dieser Workflow bleibt **INAKTIV**.  \n> In anderen Flows als **Error Workflow** einstellen.\n\n1. Slack-App erstellen unter [api.slack.com/apps](https://api.slack.com/apps)  \n   - Klicke auf **\"Create New App\"** \u2192 **From scratch**  \n   - Namen vergeben und Workspace w\u00e4hlen  \n\n2. Unter **OAuth & Permissions** diesen Scope hinzuf\u00fcgen:  \n   - `chat:write`\n\n3. Klicke auf **\"Install App to Workspace\"** und genehmige die Berechtigungen.\n\n4. F\u00fcge den Bot dem gew\u00fcnschten Channel hinzu (`#notification`):  \n   - In Slack: `/invite @dein_bot_name`\n\n5. In n8n \u2192 Node **Send Reply**:  \n   - Slack-Credentials w\u00e4hlen  \n   - Channel: `notification`  \n   - Nachricht (bereits konfiguriert):  \n     ```\n     {{$json.execution.error.message}}\n     ```\n\n6. Workflow speichern, aber **nicht aktivieren**.\n\n7. In anderen Workflows \u2192 **Einstellungen** \u2192 diesen als **Error Workflow** setzen.\n\n---\n\n## \ud83c\uddeb\ud83c\uddf7 Fran\u00e7ais\n\n> \u2757 Ce flux reste **INACTIF**.  \n> \u00c0 s\u00e9lectionner comme **Error Workflow** dans d'autres workflows.\n\n1. Cr\u00e9ez une application Slack sur [api.slack.com/apps](https://api.slack.com/apps)  \n   - Cliquez sur **\"Create New App\"** \u2192 **From scratch**  \n   - Nommez-la et choisissez l\u2019espace de travail  \n\n2. Allez dans **OAuth & Permissions** et ajoutez :  \n   - `chat:write`\n\n3. Cliquez sur **\"Install App to Workspace\"** et autorisez les acc\u00e8s.\n\n4. Ajoutez le bot dans le canal (`#notification`) :  \n   - Tapez `/invite @nom_du_bot` dans Slack\n\n5. Dans n8n \u2192 n\u0153ud **Send Reply** :  \n   - S\u00e9lectionnez les identifiants Slack  \n   - Canal : `notification`  \n   - Message :  \n     ```\n     {{$json.execution.error.message}}\n     ```\n\n6. Sauvegardez ce workflow mais **ne l\u2019activez pas**.\n\n7. Dans d'autres workflows \u2192 **Param\u00e8tres** \u2192 d\u00e9finissez ce flux comme **Error Workflow**.\n\n---\n\n## \ud83c\uddf7\ud83c\uddfa \u0420\u0443\u0441\u0441\u043a\u0438\u0439\n\n> \u2757 \u042d\u0442\u043e\u0442 workflow \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c **\u041d\u0415\u0410\u041a\u0422\u0418\u0412\u041d\u042b\u041c**.  \n> \u0415\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 workflow \u043a\u0430\u043a **Error Workflow**.\n\n1. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 Slack-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435: [api.slack.com/apps](https://api.slack.com/apps)  \n   - \u041d\u0430\u0436\u043c\u0438\u0442\u0435 **\"Create New App\"** \u2192 **From scratch**  \n   - \u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e  \n\n2. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 **OAuth & Permissions** \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 scope:  \n   - `chat:write`\n\n3. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 **\"Install App to Workspace\"** \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.\n\n4. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0431\u043e\u0442\u0430 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b (`#notification`):  \n   - \u0412 Slack \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 `/invite @\u0438\u043c\u044f_\u0431\u043e\u0442\u0430`\n\n5. \u0412 n8n \u2192 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043d\u043e\u0434\u0443 **Send Reply**:  \n   - \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 Slack credentials  \n   - \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u0430\u043d\u0430\u043b: `notification`  \n   - \u0422\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:  \n     ```\n     {{$json.execution.error.message}}\n     ```\n\n6. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 workflow, \u043d\u043e **\u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e**.\n\n7. \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 workflow \u2192 **\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438** \u2192 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u0430\u043a **Error Workflow**."
      },
      "typeVersion": 1
    },
    {
      "id": "e8a1a463-6629-4c53-abff-e3c2ea1170eb",
      "name": "Send Reply",
      "type": "n8n-nodes-base.slack",
      "position": [
        380,
        0
      ],
      "parameters": {
        "text": "=Error on WorkFlow: {{ $json.workflow.name }}\nMessage: {{ $json.execution.error.message }}\n\nlastNodeExecuted: {{ $json.execution.lastNodeExecuted }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "notification"
        },
        "otherOptions": {
          "mrkdwn": true,
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "8c82a0ff-a24b-43b4-b94b-18db2f9f1745",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -140
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 280,
        "content": "## Listen\n\n**IMPORTANT**: In your other workflows \u2192 open **Settings** \u2192 select this as **Error Workflow**."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "765da38d-5ae8-46b9-902a-7e76c66c044e",
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Send Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}