{
  "id": "ptkG7VYqHjLDrrGc",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "ErrorFlow",
  "tags": [],
  "nodes": [
    {
      "id": "2652307a-9804-46d3-a8a1-a81a3021ac4c",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "69abb2d9-03a6-44d2-bb83-9245f28f1a73",
      "name": "SETUP INSTRUCTIONS",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -500
      ],
      "parameters": {
        "width": 400,
        "height": 3200,
        "content": "# \ud83d\udea8 ERROR-MONITORING FLOW \u2014 SETUP GUIDE\n\n---\n\n## \ud83c\uddec\ud83c\udde7 English\n\n1. Create a Telegram bot with **@BotFather** and save the API token.\n\n2. Get your **chat_id**\n   - Send any message to the bot.\n   - Visit `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates`\n   - Copy the number in `chat \u2192 id`.\n\n3. Open the **\"Send a text message\"** node \u2192\n   - select the bot credentials;\n   - in **Chat ID** replace demo value `1234567890` with _your_ chat_id;\n   - (optional) edit the message \u2013 placeholders `{{$json.workflow.name}}`, `{{$json.error.message}}`, `{{$json.execution.id}}` are preset.\n\n4. Save, activate the workflow, trigger an error elsewhere to verify the alert.\n\n> \u26a0\ufe0f **Keep this flow active 24/7 \u2014 otherwise errors won't be captured.**\n\n---\n\n## \ud83c\uddea\ud83c\uddf8 Espa\u00f1ol\n\n1. Crea un bot de Telegram con **@BotFather** y guarda el token API.\n\n2. Obt\u00e9n tu **chat_id**\n   - Env\u00eda cualquier mensaje al bot.\n   - Abre `https://api.telegram.org/bot<TU_TOKEN>/getUpdates`\n   - Copia el n\u00famero en `chat \u2192 id`.\n\n3. Abre el nodo **\"Send a text message\"** \u2192\n   - selecciona las credenciales del bot;\n   - en **Chat ID** sustituye el demo `1234567890` por tu chat_id;\n   - (opcional) ajusta el texto: `{{$json.workflow.name}}`, `{{$json.error.message}}`, `{{$json.execution.id}}`.\n\n4. Guarda, activa el flujo y provoca un error para comprobar la notificaci\u00f3n.\n\n> \u26a0\ufe0f **Mant\u00e9n este flujo activo las 24 h.**\n\n---\n\n## \ud83c\udde9\ud83c\uddea Deutsch\n\n1. Telegram-Bot \u00fcber **@BotFather** erstellen und API-Token sichern.\n\n2. Deine **chat_id** ermitteln\n   - Sende dem Bot eine Nachricht.\n   - \u00d6ffne `https://api.telegram.org/bot<DEIN_TOKEN>/getUpdates`\n   - Kopiere `chat \u2192 id`.\n\n3. Node **\"Send a text message\"** \u00f6ffnen \u2192\n   - Bot-Credentials w\u00e4hlen;\n   - im Feld **Chat ID** Demo-Wert `1234567890` durch deine chat_id ersetzen;\n   - (optional) Nachrichtentext anpassen (`{{$json.workflow.name}}`, `{{$json.error.message}}`, `{{$json.execution.id}}`).\n\n4. Speichern, Flow aktivieren, Fehler ausl\u00f6sen \u2013 Benachrichtigung pr\u00fcfen.\n\n> \u26a0\ufe0f **Flow dauerhaft aktiv lassen!**\n\n---\n\n## \ud83c\uddeb\ud83c\uddf7 Fran\u00e7ais\n\n1. Cr\u00e9ez un bot Telegram via **@BotFather** et notez le jeton API.\n\n2. Trouvez votre **chat_id**\n   - Envoyez un message au bot.\n   - Allez sur `https://api.telegram.org/bot<VOTRE_TOKEN>/getUpdates`\n   - Copiez la valeur `chat \u2192 id`.\n\n3. Ouvrez le n\u0153ud **\"Send a text message\"** \u2192\n   - s\u00e9lectionnez les identifiants du bot ;\n   - dans **Chat ID** remplacez `1234567890` par votre chat_id ;\n   - (facultatif) modifiez le message : `{{$json.workflow.name}}`, `{{$json.error.message}}`, `{{$json.execution.id}}`.\n\n4. Enregistrez, activez le flux, g\u00e9n\u00e9rez une erreur pour v\u00e9rifier l'alerte.\n\n> \u26a0\ufe0f **Laissez ce flux actif 24 h/24.**\n\n---\n\n## \ud83c\uddf7\ud83c\uddfa \u0420\u0443\u0441\u0441\u043a\u0438\u0439\n\n1. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 Telegram-\u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 **@BotFather** \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 API-token.\n\n2. \u0423\u0437\u043d\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u0439 **chat_id**\n   - \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u043e\u0442\u0443;\n   - \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 `https://api.telegram.org/bot<\u0412\u0410\u0428_\u0422\u041e\u041a\u0415\u041d>/getUpdates`;\n   - \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0447\u0438\u0441\u043b\u043e `chat \u2192 id`.\n\n3. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043d\u043e\u0434\u0443 **\"Send a text message\"** \u2192\n   - \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 credentials \u0431\u043e\u0442\u0430;\n   - \u0432 \u043f\u043e\u043b\u0435 **Chat ID** \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0435\u043c\u043e `1234567890` \u043d\u0430 \u0441\u0432\u043e\u0439 chat_id;\n   - \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 (`{{$json.workflow.name}}`, `{{$json.error.message}}`, `{{$json.execution.id}}`).\n\n4. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 workflow \u0438 \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.\n\n> \u26a0\ufe0f **\u0414\u0435\u0440\u0436\u0438\u0442\u0435 Flow \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u0440\u0443\u0433\u043b\u043e\u0441\u0443\u0442\u043e\u0447\u043d\u043e.**"
      },
      "typeVersion": 1
    },
    {
      "id": "bedab42b-ab15-4935-a81a-ad531c58de16",
      "name": "Send a text message with info about error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        340,
        0
      ],
      "parameters": {
        "text": "=Error en flow  {{ $json.workflow.name }}",
        "chatId": "123456789",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "fc92044c-97f2-4294-8f68-d2876453ad5d",
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Send a text message with info about error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}