Skip to main content

Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging

Workflow preview

Workflow preview
100%
Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging preview
Open on n8n.io

1. Workflow Overview

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, re...

Best for

  • Ticket Management automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.postgres, n8n-nodes-base.code, n8n-nodes-base.telegram, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.formtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Hideki.

Original n8n.io source

1.1 Workflow description

Title
Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging
Workflow name
Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging

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_sent table 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-webhook with x-tenant-token header

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Database Schema

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Webhook flow group

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Schedule flow group

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Registration group

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Send and log group

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Every minute - check due events

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 8 - Log success to database

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 9 - Mark reminder as sent

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 10 - Render Template

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Log error to database

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 12 - Send reminder via Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Receive event via webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 14 - Validate tenant token

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Map webhook fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Tenant registration form

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.3

Block 17 - Organize form data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Show registration success

Type / Role
n8n-nodes-base.form - form
Config choices
Version 2.3

Block 19 - Fetch events due for reminder

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 20 - Fetch tenant config

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 21 - Insert tenant rule

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 22 - Insert tenant

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 23 - No events due - skip

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 24 - Route by channel type

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

3. Summary Table

Workflow Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging
Complexity advanced
Nodes 24
Categories Ticket Management
Author Lucas Hideki
Published 04 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13877/13877.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Send multi-tenant reminders via Telegram from webhooks and schedule with Postgres logging do?

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, re...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management use case.