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.

n8nRead on 2026-11-165 steps

Steps

  1. Trigger: Runs every day at 08:00
  2. Queries PostgreSQL for pending action logsPostgreSQL
    Also overdue follow-ups and pipeline status.
  3. Calls two HTTP health-check endpointsHTTP Request
    UP/DOWN service status summary.
  4. Sends the results to OpenAIOpenAI
    Plain-text bullet briefing ordered by urgency.
  5. 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