Lightweight Support Desk with Telegram and Postgres Database Tracking
Telegram ticket intake and status tracking with Postgres
Who’s it for Anyone running support requests through Telegram, Email, Webhooks, and so on who needs a lightweight ticketing system without paying Zendesk prices. Ideal for small teams, freelancers, or businesses that want tickets logged in a structured database (Postgres) and tracked automatically. I'm using Telegram since it's the most convenient one.
How it works / What it does
This workflow turns (Telegram) into a support desk:
Receives new requests via a Telegram bot command.
Creates a ticket in a Postgres database with a correlation ID, requester details, and status.
Auto-confirms back to the requester with the ticket ID.
Provides ticket updates (status changes, resolutions) when queried.
Keeps data clean using dedupe keys and controlled input handling.
How to set up
Create a Telegram bot using @BotFather and grab the token.
Connect your Postgres database to n8n and create a tickets table:
CREATE TABLE tickets ( id BIGSERIAL PRIMARY KEY, correlation_id UUID, source TEXT, external_id TEXT, requester_name TEXT, requester_email TEXT, requester_phone TEXT, subject TEXT, description TEXT, status TEXT, priority TEXT, dedupe_key TEXT, chat_id TEXT, created_at TIMESTAMP DEFAULT NOW(), updated_at TIMESTAMP DEFAULT NOW() );
Add your Telegram and Postgres credentials in n8n (via the Credentials tab, not hardcoded).
Import the workflow JSON and replace the placeholder credentials with yours.
Test by sending /new in Telegram and follow the prompts.
Requirements
n8n (latest version recommended)
Telegram bot token
Postgres instance (local, Docker, or cloud)
How to customize the workflow
Change database fields if you need more requester info.
Tweak the Switch node and Comands for multiple status types.
Extend with Slack, Discord, or email nodes for broader notifications.
Integrate with external systems (CRM, project management) by adding more branches.
Related Templates
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
Compare Lists and Identify Common Items & Differences Using Custom Keys
This workflow compares two lists of objects (List A and List B) using a user-specified key (e.g. email, id, domain) and ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments