Templates / Create secure human-in-the-loop approval flows with Postgres and Telegram

Create secure human-in-the-loop approval flows with Postgres and Telegram

Ready for 3.0

by Mohammad · 678 views · created 2025-09-28 · Ticket Management

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (6)

PostgresTelegram

What it does

🔐 Human-in-the-Loop Approval Flow (n8n + Postgres + Telegram) 👥 Who’s it for Teams that need a manager approval step before a ticket or request can change status. Great for internal ops, IT requests, or any workflow where “a human must sign off.” ⚡ What it does - 📨 Manager receives approval/reject link - 🔑 Link is signed with HMAC + expiry (secure & tamper-proof) - 🗄️ Postgres updates the ticket status - 📝 Audit trail records every decision - 📲 Telegram notifies both manager and requester - ⏰ Expired or invalid links trigger alerts and logs 🛠 Requirements - n8n instance (self-hosted) - Postgres database (with tickets, ticketaudit, workflowerrors) - Telegram bot token - One environment variable set: SECRETKEY ⚙️ How to set up 1. Set SECRETKEY in .env 2. Create Postgres tables (SQL provided) 3. Add Telegram + Postgres credentials in n8n 4. Import the workflow JSON 5. Test by opening an approval/reject link in your browser 🎨 How to customize - Change who the “manager” is (currently hardcoded in the Code node). - Swap Telegram for Slack or email notifications. - Extend the audit schema to include more metadata (IP, username).

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.