AutomationFlowsAI & RAG › Evaluate Overage Rule

Evaluate Overage Rule

04 - Evaluate Overage Rule. Uses httpRequest, postgres. Webhook trigger; 3 nodes.

Webhook trigger★☆☆☆☆ complexity3 nodesHTTP RequestPostgres
AI & RAG Trigger: Webhook Nodes: 3 Complexity: ★☆☆☆☆ Added:

This workflow follows the HTTP Request → Postgres 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 →

Download .json
{
  "name": "04 - Evaluate Overage Rule",
  "active": false,
  "nodes": [
    {
      "id": "overage-webhook",
      "name": "Overage Evaluation Request",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "revenue-leakage/evaluate/overage",
        "responseMode": "lastNode"
      }
    },
    {
      "id": "overage-service",
      "name": "Run Versioned Rule",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        260,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $env.LEAKAGE_ENGINE_URL + '/v1/evaluate' }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $env.LEAKAGE_ENGINE_TOKEN }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{ JSON.stringify({...$json.body, rule: 'missing_overage'}) }}"
      }
    },
    {
      "id": "persist-overage",
      "name": "Persist Deduplicated Finding",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.5,
      "position": [
        520,
        0
      ],
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT persist_leakage_evaluation($1::jsonb);",
        "options": {
          "queryReplacement": "={{ [JSON.stringify($json)] }}"
        }
      }
    }
  ],
  "connections": {
    "Overage Evaluation Request": {
      "main": [
        [
          {
            "node": "Run Versioned Rule",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Versioned Rule": {
      "main": [
        [
          {
            "node": "Persist Deduplicated Finding",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a4d335d7-2fca-428e-8653-f84182efefc4",
  "meta": {
    "evidence": "orchestration artifact; overage math is owned by the tested Python service"
  },
  "tags": []
}
Pro

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

About this workflow

04 - Evaluate Overage Rule. Uses httpRequest, postgres. Webhook trigger; 3 nodes.

Source: https://github.com/Etherlabs-dev/revenue_leakage_system/blob/main/n8n-workflows/04-detect-missing-overages.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

This template is for developers, teams, and automation enthusiasts who want a private, PIN-protected Telegram chatbot that answers questions from their own documents — without relying on external AI A

Postgres, Telegram, HTTP Request +2
AI & RAG

Question Answering Workflow. Uses httpRequest, postgres. Webhook trigger; 8 nodes.

HTTP Request, Postgres
AI & RAG

Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.

Postgres, OpenAI, HTTP Request +1
AI & RAG

Lua Nova - Sistema Completo. Uses postgres, httpRequest, openAi. Webhook trigger; 55 nodes.

Postgres, HTTP Request, OpenAI
AI & RAG

User Signup & Verification: The workflow starts when a user signs up. It generates a verification code and sends it via SMS using Twilio. Code Validation: The user replies with the code. The workflow

Postgres, HTTP Request, OpenAI +2