Create a Witty Telegram Bot with AI-Powered Humor, Roasts & Stats using OpenRouter
Ready for 3.0What this workflow does
This AI workflow has 26 nodes and runs on Telegram events (plus 1 other trigger). Along the way it connects Telegram, OpenRouter Chat Model and Postgres.
How it runs
Trigger: On Telegram events (plus 1 other trigger).
- Log message + statistics (Postgres): run a query
- Switch: routes items into 8 branches
- Get scheduled posts (Postgres): run a query
- Chat history (Postgres): run a query
- Get user statistics (Postgres): run a query
- Generating an information response (Code): runs custom JavaScript code
- Get top users (Postgres): run a query
- If: checks a condition and branches into true / false
- Mention Analysis (Code): runs custom JavaScript code
- Log command (Postgres): run a query
…plus 13 more steps. See the full node list below.
Services it uses
Other Telegram + OpenRouter templates (136) · Other Telegram + PostgreSQL templates (70) · Other OpenRouter + PostgreSQL templates (32)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Switch
n8n-nodes-base.switch
From the author
GiggleGPTBot — Witty Telegram Bot with AI & Postgres 📝 Overview GiggleGPTBot is a witty Telegram bot built with n8n, OpenRouter, and Postgres. It delivers short jokes, motivational one-liners, and playful roasts, responds to mentions, and posts scheduled…