تنبيهات أخطاء التطبيق على تيليجرام

أرسل أخطاء تطبيقك أو خادمك إلى webhook واحصل على تنبيه واضح على تيليجرام خلال ثوانٍ.

سهل توفّر ~2 ساعة شهريًا المطورون وتقنية المعلوماتبواسطة فريق Flowngn

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: Webhook — تطبيقك يبلغ عن خطأ
  1. يرسل تطبيقك الخطأ (التطبيق، المستوى، الرسالة، الرابط) إلى الـ webhook.
  2. صِغه في تنبيه قصير.
  3. أرسل الأخطاء والأعطال القاتلة إلى تيليجرام وتجاهل التحذيرات.

المخطط

trueError reportWebhook{ }Format alertCode⑂Error or worse?IfTAlert on TelegramTelegram
مشغّل تطبيق منطق كود

الكود

كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.

Format alert · عقدة Code
// Mode: Run Once for Each Item
// Shapes an error report from your app (or Sentry, Uptime Kuma, etc.) into a Telegram alert.
// Send JSON like: { "app": "shop-api", "level": "error", "message": "...", "url": "...", "user": "..." }
const b = $json.body || {};
const level = String(b.level || "error").toLowerCase();
const icon = { fatal: "🔥", error: "🚨", warning: "⚠️" }[level] || "ℹ️";

return {
  json: {
    level,
    message:
      `${icon} ${level.toUpperCase()} in ${b.app || "your app"}\n` +
      String(b.message || "No message").slice(0, 500) +
      (b.url ? `\n🔗 ${b.url}` : "") +
      (b.user ? `\n👤 ${b.user}` : ""),
  },
};

ابنِها بأداتك

اختر أداتك — نفس الأتمتة، خطوة بخطوة.

انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.

ملف Workflow JSON
عرض الكود (143 سطر)
{
  "name": "تنبيهات أخطاء التطبيق على تيليجرام (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## تنبيهات أخطاء التطبيق على تيليجرام\nأرسل أخطاء تطبيقك أو خادمك إلى webhook واحصل على تنبيه واضح على تيليجرام خلال ثوانٍ.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "292c1d67-c80f-4b2d-ac0c-65a1549bb117",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "app-error",
        "options": {}
      },
      "id": "292c1d67-c80f-4b2d-ac0c-65a1549bb117",
      "name": "Error report",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "webhookId": "292c1d67-c80f-4b2d-ac0c-65a1549bb117"
    },
    {
      "parameters": {
        "jsCode": "// Mode: Run Once for Each Item\n// Shapes an error report from your app (or Sentry, Uptime Kuma, etc.) into a Telegram alert.\n// Send JSON like: { \"app\": \"shop-api\", \"level\": \"error\", \"message\": \"...\", \"url\": \"...\", \"user\": \"...\" }\nconst b = $json.body || {};\nconst level = String(b.level || \"error\").toLowerCase();\nconst icon = { fatal: \"🔥\", error: \"🚨\", warning: \"⚠️\" }[level] || \"ℹ️\";\n\nreturn {\n  json: {\n    level,\n    message:\n      `${icon} ${level.toUpperCase()} in ${b.app || \"your app\"}\\n` +\n      String(b.message || \"No message\").slice(0, 500) +\n      (b.url ? `\\n🔗 ${b.url}` : \"\") +\n      (b.user ? `\\n👤 ${b.user}` : \"\"),\n  },\n};",
        "mode": "runOnceForEachItem"
      },
      "id": "292c1d67-c80f-4b2d-ac0c-65a1549bb117",
      "name": "Format alert",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ ['error', 'fatal'].includes($json.level) }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "292c1d67-c80f-4b2d-ac0c-65a1549bb117",
      "name": "Error or worse?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "chatId": "YOUR_CHAT_ID",
        "text": "={{ $json.message }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "id": "292c1d67-c80f-4b2d-ac0c-65a1549bb117",
      "name": "Alert on Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        900,
        0
      ]
    }
  ],
  "connections": {
    "Error report": {
      "main": [
        [
          {
            "node": "Format alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format alert": {
      "main": [
        [
          {
            "node": "Error or worse?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error or worse?": {
      "main": [
        [
          {
            "node": "Alert on Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

← افتحها في ساحة التجربة لتعديلها

نصائح

  • لا ترسل أبدًا كلمات مرور أو توكنات أو بيانات عملاء في رسائل الأخطاء.

أتمتات مشابهة