AutomationFlowsData & Sheets › Track Complaint Status

Track Complaint Status

Track Complaint Status. Uses postgres. Webhook trigger; 4 nodes.

Webhook trigger★★☆☆☆ complexity4 nodesPostgres
Data & Sheets Trigger: Webhook Nodes: 4 Complexity: ★★☆☆☆ Added:

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 →

Download .json
{
  "name": "Track Complaint Status",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "GET",
        "path": "track-complaint/:tokenNumber",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-4",
      "name": "Webhook - Track",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT complaint_token, reporter_name, incident_type, incident_date, status, submission_date, nearest_police_station, incident_description FROM complaints WHERE complaint_token = '{{ $json.params.tokenNumber }}'"
      },
      "id": "postgres-5",
      "name": "Get Complaint",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2,
      "position": [
        450,
        300
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT * FROM complaint_updates WHERE complaint_token = '{{ $json[0].complaint_token }}' ORDER BY update_date DESC"
      },
      "id": "postgres-6",
      "name": "Get Updates",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2,
      "position": [
        650,
        300
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"success\": true, \"complaint\": $('Get Complaint').item.json, \"updates\": $('Get Updates').all() } }}"
      },
      "id": "response-5",
      "name": "Return Data",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    }
  ],
  "connections": {
    "Webhook - Track": {
      "main": [
        [
          {
            "node": "Get Complaint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Complaint": {
      "main": [
        [
          {
            "node": "Get Updates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Updates": {
      "main": [
        [
          {
            "node": "Return Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Track Complaint Status. Uses postgres. Webhook trigger; 4 nodes.

Source: https://github.com/Mazzz106/cyber-crime-portal/blob/ee4e96615077856570ea6f8c05a8b83b500ea8ee/n8n-workflows/4-track-complaint.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reservations, food orders, and restaurant information requests through natural langua

Postgres
Data & Sheets

Create - KB. Uses postgres, crypto. Webhook trigger; 10 nodes.

Postgres, Crypto
Data & Sheets

Acts as a virtual receptionist for the restaurant, handling incoming calls via VAPI without human intervention. It collects user details (name, booking time, number of people) for table bookings, chec

Postgres
Data & Sheets

Get - KB. Uses postgres. Webhook trigger; 9 nodes.

Postgres
Data & Sheets

Text-to-SQL: Check Status. Uses postgres. Webhook trigger; 5 nodes.

Postgres