This workflow follows the Error Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "WB-07: SLA Breach Escalation (Every 2h)",
"nodes": [
{
"id": "wb07-001",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
250,
300
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 2
}
]
}
}
},
{
"id": "wb07-002",
"name": "Query Breached Complaints",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
300
],
"parameters": {
"method": "POST",
"url": "https://wb-grievance-portal.vercel.app/api/complaints/escalate-batch",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{ \"complaints\": [], \"report\": \"SLA Breach Check - Automated\" }",
"options": {}
}
},
{
"id": "wb07-003",
"name": "Has Breaches?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
750,
300
],
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": ""
},
"conditions": [
{
"leftValue": "={{ $json.summary.total }}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "larger"
}
}
]
}
}
},
{
"id": "wb07-004",
"name": "Format SLA Report",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1000,
200
],
"parameters": {
"jsCode": "const data = $input.first().json;\nconst summary = data.summary || {};\nconst results = data.results || [];\nconst now = new Date().toLocaleString('en-IN', {timeZone:'Asia/Kolkata'});\nconst escalated = results.filter(r => r.success);\nlet report = '\ud83d\udea8 SLA Breach Report \u2014 ' + now + '\\n\\n';\nreport += '\ud83d\udcca \u09b8\u09be\u09b0\u09b8\u0982\u0995\u09cd\u09b7\u09c7\u09aa | Summary:\\n';\nreport += '\u251c \u09ae\u09cb\u099f \u09aa\u09b0\u09c0\u0995\u09cd\u09b7\u09bf\u09a4: ' + (summary.total||0) + '\\n';\nreport += '\u251c \u2705 \u098f\u09b8\u0995\u09cd\u09af\u09be\u09b2\u09c7\u099f \u0995\u09b0\u09be \u09b9\u09af\u09bc\u09c7\u099b\u09c7: ' + (summary.escalated||0) + '\\n';\nreport += '\u251c \ud83d\udd34 \u0987\u09a4\u09bf\u09ae\u09a7\u09cd\u09af\u09c7 Critical: ' + (summary.alreadyCritical||0) + '\\n';\nreport += '\u2514 \u274c \u09ac\u09cd\u09af\u09b0\u09cd\u09a5: ' + (summary.failed||0) + '\\n\\n';\nif (escalated.length > 0) {\n report += '\ud83d\udccc \u098f\u09b8\u0995\u09cd\u09af\u09be\u09b2\u09c7\u099f\u09c7\u09a1 \u099f\u09bf\u0995\u09c7\u099f | Escalated Tickets:\\n';\n escalated.forEach(r => {\n report += ' \u2022 ' + (r.ticketNo||r.id) + ': ' + (r.previousUrgency||'') + ' \u2192 ' + (r.newUrgency||'') + '\\n';\n });\n}\nreturn [{ json: { report, breached: summary.total > 0 } }];"
}
},
{
"id": "wb07-005",
"name": "Get Admin Users",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1250,
200
],
"parameters": {
"method": "GET",
"url": "https://wb-grievance-portal.vercel.app/api/users/list?role=ADMIN&isActive=true",
"options": {}
}
},
{
"id": "wb07-006",
"name": "Send Alert to Admins",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1500,
200
],
"parameters": {
"jsCode": "const report = $('Format SLA Report').first().json.report;\nconst admins = $input.first().json.users || [];\nreturn admins.filter(u => u.notifyVia !== 'none' && u.whatsappPhone).map(u => ({ json: { phone: u.whatsappPhone, report } }));"
}
},
{
"id": "wb07-007",
"name": "No Breaches - End",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1000,
400
],
"parameters": {}
},
{
"id": "wb07-010",
"name": "Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"typeVersion": 1,
"position": [
250,
600
],
"parameters": {}
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Query Breached Complaints",
"type": "main",
"index": 0
}
]
]
},
"Query Breached Complaints": {
"main": [
[
{
"node": "Has Breaches?",
"type": "main",
"index": 0
}
]
]
},
"Has Breaches?": {
"main": [
[
{
"node": "Format SLA Report",
"type": "main",
"index": 0
}
],
[
{
"node": "No Breaches - End",
"type": "main",
"index": 0
}
]
]
},
"Format SLA Report": {
"main": [
[
{
"node": "Get Admin Users",
"type": "main",
"index": 0
}
]
]
},
"Get Admin Users": {
"main": [
[
{
"node": "Send Alert to Admins",
"type": "main",
"index": 0
}
]
]
},
"Send Alert to Admins": {
"main": [
[]
]
},
"No Breaches - End": {
"main": [
[]
]
}
},
"settings": {
"executionOrder": "v1",
"timezone": "Asia/Kolkata"
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
WB-07: SLA Breach Escalation (Every 2h). Uses httpRequest, errorTrigger. Scheduled trigger; 8 nodes.
Source: https://github.com/mahatosnehabala250-project/wb-grievance-portal/blob/8cc07d3353e579195c600931867231d0b715715a/n8n-workflows/wb-07-sla-escalation.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
PRIMA - Automatisation Prospection Sophie (nettoyé). Uses httpRequest, errorTrigger, emailSend. Scheduled trigger; 20 nodes.
WB-08: Daily Report (9 AM IST). Uses httpRequest, errorTrigger. Scheduled trigger; 8 nodes.
As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o
This workflow is an improvement of this workflow by Greg Brzezinka.
N8N-Workflow-Github-Manager. Uses github, httpRequest, n8n. Scheduled trigger; 38 nodes.