Government

Citizen Complaint Routing & SLA Escalation

Takes complaints over WhatsApp, has AI classify them and route them to the right department, stores them in a database and confirms receipt. Complaints that miss their SLA are escalated automatically.

The Citizen Complaint Routing & SLA Escalation workflow on the n8n canvas, with its 22 nodes and connections
The workflow on the n8n canvas. Click to open it full size.

At a glance

Category
Government
Nodes
22
Apps
OpenAI, HTTP
Price
Free
Download JSON
On this page

How it works

  1. A WhatsApp message arrives through a webhook.
  2. AI classifies the complaint (water, electricity, sanitation and so on).
  3. It's assigned to the right department and saved in Postgres.
  4. The citizen gets a confirmation with a reference.
  5. Every few minutes, pending complaints are checked and SLA breaches are escalated.

Use cases

  • Municipal corporations
  • Utility providers
  • Housing societies and campuses

What you need

This workflow connects to these apps.

  • n8n
  • OpenAI
  • HTTP

You'll need an n8n instance, on n8n Cloud or self-hosted, and these credentials. Our credentials guide shows how to create each one.

  • OpenAI account
  • Postgres account
  • Twilio account

Setup

  1. Download the JSON and import it into n8n with Import from File, or copy it and paste it onto an empty canvas. The import guide walks through both.
  2. Connect the credentials listed above.
  3. Point the Sheets, Airtable, Drive, and Slack nodes at your own files and channels.
  4. Replace placeholder emails, phone numbers, and form links with your own.
  5. Times use the America/New York timezone and dates use MM/DD/YYYY. Change them if you need to, then test and activate. The setup guide covers this step by step.

Nodes

NodeType
OpenAI Chat ModellmChatOpenAi
Simple MemorymemoryBufferWindow
Citizen Request Webhookwebhook
Extract WhatsApp Messageset
AI Complaint Classifieragent
Route to Departmentswitch
Assign Water Departmentset
Assign Electricity Departmentset
Assign Sanitation Departmentset
Save Complaint to Databasepostgres
Generate Confirmation Messagecode
Send WhatsApp Notificationtwilio
SLA Scheduler (Every 5 Minutes)scheduleTrigger
Fetch Pending Complaintspostgres
Check SLA Breachif
Mark Complaint as Escalatedpostgres
Assign Senior Officerset
Generate Escalation Alert Messagecode
Send Escalation WhatsApp Alerttwilio
No SLA Breach (Skip)noOp

Frequently asked questions

Takes complaints over WhatsApp, has AI classify them and route them to the right department, stores them in a database and confirms receipt. Complaints that miss their SLA are escalated automatically. It's a 22-node n8n workflow.

An n8n instance, on n8n Cloud or self-hosted, and credentials for OpenAI, Postgres, and Twilio. It uses only nodes that ship with n8n, so there's nothing else to install.

Download the JSON, then in n8n create a new workflow, open the menu in the top right, and choose Import from File. You can also copy the JSON and paste it onto an empty canvas.

Yes. It's free to download, import, and change, with no sign-up. You only pay for the apps it connects to, where those aren't free on your plan.

Keep exploring
  • n8n canvas of the AI Crop Advisory for Farmers workflow

    Agriculture27 nodes

    AI Crop Advisory for Farmers

    Gives farmers practical, AI-generated crop advice based on their soil, crop and live weather. Advice is delivered instantly on sign-up and refreshed daily over WhatsApp.

  • n8n canvas of the AI Email Classifier & Slack Router workflow

    AI Automation11 nodes

    AI Email Classifier & Slack Router

    Reads incoming emails, has AI classify each one (support, sales, billing, HR and so on) and notifies the right team on Slack straight away.

  • n8n canvas of the AI Shopify Product Builder with Review workflow

    E-commerce37 nodes

    AI Shopify Product Builder with Review

    Creates complete Shopify products from a photo or a brief. AI writes the copy, generates images and saves everything for review, and approved products are published automatically.