π« Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging
β‘ 63 views Β· π« Ticket Management & Triage
Description
How it works
- Any external system triggers a reminder via webhook with a tenant token β the workflow validates the token, fetches the tenantβs channel config and message template from PostgreSQL, renders the message with event variables, and sends it immediately
- A schedule trigger runs every minute and queries events approaching their deadline window per tenant β idempotency via a
reminders_senttable ensures the same reminder is never sent twice - A built-in n8n form lets you register new tenants with their channel, message template and timing rules β no external backend needed
- Every send attempt is logged to the database with status, message sent and error details
Set up steps
- Add your PostgreSQL credentials to all Postgres nodes (~2 min)
- Add your Telegram credentials to the Send Message node (~2 min)
- Create the required tables using the SQL schema provided in the workflow sticky note (~10 min)
- Register your first tenant at
/form/multi-tenant-register - Send events via
POST /webhook/multi-tenant-webhookwithx-tenant-tokenheader
π Nodes Used
Postgres, Webhook, Telegram, Schedule Trigger, n8n Form Trigger, n8n Form
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File