Daily Postgres briefing to Telegram
OpenAI writes a morning briefing from PostgreSQL for Telegram. This n8n template runs every day at a set morning time. It queries PostgreSQL for action logs pending approval, overdue follow-ups and a pipeline status breakdown, and calls two HTTP health-check endpoints to build an UP or DOWN service status. The query results and the status summary go to OpenAI, which writes a short plain-text bullet briefing ordered by urgency. The briefing is posted to a Telegram chat. The SQL queries are edited to match your own tables. It suits teams that keep tasks, approvals or CRM data in PostgreSQL.
Steps
- Trigger: Runs every day at 08:00
- Queries PostgreSQL for pending action logsPostgreSQL
Also overdue follow-ups and pipeline status. - Calls two HTTP health-check endpointsHTTP Request
UP/DOWN service status summary. - Sends the results to OpenAIOpenAI
Plain-text bullet briefing ordered by urgency. - Output: Posts the generated briefing to TelegramTelegram
Limits
- Needs a Telegram bot token and chat ID.
- The SQL queries must be rewritten for your own tables.
What it does well
- Health checks continue on error.
- The briefing is ordered by urgency.
Before you import
After the import, add PostgreSQL, OpenAI and Telegram credentials, update the three SQL queries, and set the chat ID and health-check URLs.
Similar templates
Daily AI news digest from Google News
Also for scheduling and ops, 6 steps.
Weekly GA4 report with Gemini summary
Also for scheduling and ops, 6 steps.
Weekly SEMrush and GA4 SEO report
Also for scheduling and ops, 7 steps.
OpenAI and Telegram: 4 templates compared
Same two apps, different steps.
HTTP Request and OpenAI: 2 templates compared
Same two apps, different steps.
HTTP Request and Telegram: 2 templates compared
Same two apps, different steps.
OpenAI and PostgreSQL: 2 templates compared
Same two apps, different steps.
Notify a team
Other templates that do this task.