Send daily AI briefings from Postgres to Telegram with OpenAI
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs on a schedule (every day at 08:00). Along the way it connects Postgres, OpenAI Chat Model and Telegram.
How it runs
Trigger: On a schedule (every day at 08:00).
- Config (Edit Fields (Set)): sets 3 fields: telegram_chat_id, service_a_health_url, service_b_health_url
- Pending approvals (Postgres): run a query
- Overdue follow-ups (Postgres): run a query
- Pipeline summary (Postgres): run a query
- Check service A health (HTTP Request): calls an HTTP API (GET)
- Check service B health (HTTP Request): calls an HTTP API (GET)
- Summarise service status (Code): runs custom JavaScript code
- Write the briefing (AI Agent): runs an AI agent, with model: OpenAI model
- Send to Telegram (Telegram): uses Telegram
Services it uses
Other Telegram + OpenAI templates (807) · Other OpenAI + PostgreSQL templates (191) · Other Telegram + PostgreSQL templates (70)
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 (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Postgres
n8n-nodes-base.postgres - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Telegram
n8n-nodes-base.telegram - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick overview This workflow runs every morning, pulls operational and CRM data from PostgreSQL, checks two service health endpoints over HTTP, uses OpenAI to write a short prioritized daily briefing, and sends the briefing to a Telegram chat. How it works 1.…