Detect fraud in user activity with PostgreSQL, OpenAI and Slack
Needs changesNeeds 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.
- Request Validator (Code): runs custom JavaScript code
- Fetch Recent User Logs (Postgres): run a query
- Context Builder (Code): runs custom JavaScript code
- Fraud Rules Engine (Function): runs custom JavaScript (legacy Function node)
- AI Fraud Interpreter (OpenAI): work with chat
- AI Response Cleaner (Code): runs custom JavaScript code
- Risk Decision Combiner (Code): runs custom JavaScript code
- Database Logger (Postgres): run a query
- High Risk Filter (If): checks a condition and branches into true / false
- Slack: uses Slack
Services it uses
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.0 | Replace 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)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Postgres
n8n-nodes-base.postgres - Function
n8n-nodes-base.function - OpenAI
n8n-nodes-base.openAi - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack
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…