Templates / Detect fraud in user activity with PostgreSQL, OpenAI and Slack

Detect fraud in user activity with PostgreSQL, OpenAI and Slack

Needs changes

by WeblineIndia ✓ · 59 views · created 2026-05-01 · SecOps, AI Summarization

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: Function (legacy), OpenAI (legacy). 2 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Postgres and Slack.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Request Validator (Code): runs custom JavaScript code
  2. Fetch Recent User Logs (Postgres): run a query
  3. Context Builder (Code): runs custom JavaScript code
  4. Fraud Rules Engine (Function): runs custom JavaScript (legacy Function node)
  5. AI Fraud Interpreter (OpenAI): work with chat
  6. AI Response Cleaner (Code): runs custom JavaScript code
  7. Risk Decision Combiner (Code): runs custom JavaScript code
  8. Database Logger (Postgres): run a query
  9. High Risk Filter (If): checks a condition and branches into true / false
  10. Slack: uses Slack

Services it uses

PostgresSlack

Before you upgrade to n8n 3.0

2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:

  • Function (legacy) in Fraud Rules Engine: replace with Code node, mode 'Run Once for All Items'.
  • OpenAI (legacy) in AI Fraud Interpreter: replace with OpenAI node (AI section).
Removed in 3.0Replace with
Function (legacy)
Fraud Rules Engine
Code node, mode 'Run Once for All Items'
OpenAI (legacy)
AI Fraud Interpreter
OpenAI node (AI section)

Nodes used (7)

From the author

AI Fraud Detection Workflow > n8n + PostgreSQL + OpenAI + Slack --- This AI Fraud Detection Workflow is an automated n8n pipeline that analyzes user activity in real time using a combination of rule-based fraud detection, AI interpretation and historical…

Excerpt from WeblineIndia's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.