App error alerts on Telegram
Send errors from your app or server to a webhook and get a clear alert on Telegram within seconds.
How it works
Trigger: Webhook — your app reports an error
- Your app POSTs the error (app, level, message, url) to the webhook.
- Format it into a short alert.
- Send errors and fatal crashes to Telegram; skip warnings.
Diagram
Trigger App Logic Code
Code
JavaScript used in the Code step — already included in the template below.
// 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}` : ""),
},
};Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.
Show code (143 lines)
{
"name": "App error alerts on Telegram (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## App error alerts on Telegram\nSend errors from your app or server to a webhook and get a clear alert on Telegram within seconds.\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": []
}In Make, create a new scenario and add these modules in order:
- Webhooks › Custom webhook
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Filter on the next route: “Error or worse?”
- If yesTelegram Bot › Send a Text Message or a Reply
- Every module run uses Make operations — the free plan includes a monthly quota.
- Make's built-in functions (map, sum, formatDate…) can replace most Code steps; for complex logic use a code module.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- Webhooks by Zapier — Catch Hook
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Filter by Zapier: “Error or worse?”
- If yesTelegram — Send Message
- Zaps with more than two steps need a paid Zapier plan.
- Webhooks, Filters/Paths and Code by Zapier are premium features on some Zapier plans.
- Code by Zapier runs JavaScript: reuse the code shown above, reading inputs from inputData instead of $json.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- Never send passwords, tokens or customer data in error messages.
Related flows
Developer & ITEasy
Free website uptime monitor
Check your website every 5 minutes and get a Telegram alert if it goes down.
HTTP Request → Telegram4h/mo
Developer & ITEasy
SSL certificate expiry alert
Get a Telegram alert 14 days before any of your websites' SSL certificates expire.
HTTP Request → Telegram1h/mo
Developer & ITEasy
Domain expiry alert on Telegram
Every week, check when your domains expire and get a Telegram alert 30 days before.
HTTP Request → Telegram1h/mo