# Send multi-tenant reminders with Telegram and Postgres: n8n workflow

> Started by someone submitting a form, and works across Postgres and Telegram. 18 steps, 1 branch: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/send-multi-tenant-reminders-with-telegram-and-postgres (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# Send multi-tenant reminders with Telegram and Postgres

Started by someone submitting a form, and works across Postgres and Telegram. 18 steps, 1 branch: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsend-multi-tenant-reminders-with-telegram-and-postgres)

**18 steps** Medium: a working afternoon

**1** Branch: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 3 Logic 6 Service 9

The steps in the order they run, from what starts it.

- 1 **Every minute - check due events** Schedule trigger *Starts it*
- 2 **Receive event via webhook** Webhook *Starts it*
- 3 **Tenant registration form** Form trigger *Starts it*
- 4 **Fetch events due for reminder** Postgres *Service*
- 5 **Validate tenant token** Code *Logic*
- 6 **Organize form data** Code *Logic*
- 7 **Render Template** Code *Logic*
- 8 **Fetch tenant config** Postgres *Service*
- 9 **Insert tenant** Postgres *Service*
- 10 **Route by channel type** If *Logic*
- 11 **Map webhook fields** Set *Logic*
- 12 **Insert tenant rule** Postgres *Service*
- 13 **Send reminder via Telegram** Telegram *Service*
- 14 **No events due - skip** No Op *Logic*
- 15 **Show registration success** Form *Service*
- 16 **Mark reminder as sent** Postgres *Service*
- 17 **Log success to database** Postgres *Service*
- 18 **Log error to database** Postgres *Service*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 18, with 1 branch
- **Size:** Medium: a working afternoon
- **Connects to:** Postgres, Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Postgres and Telegram accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 18 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsend-multi-tenant-reminders-with-telegram-and-postgres)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**Book paid legal appointments with Stripe and Google Calendar** 18 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/book-paid-legal-appointments-with-stripe-and-google-calendar)
- [**Automate post-meeting tasks with Fireflies and OpenAI** 18 steps · calls a model · Gmail, Telegram](https://millionrounds.com/workflow/automate-post-meeting-tasks-with-fireflies-and-openai)
- [**Manage Telegram task reminders with Claude** 18 steps · calls a model · Telegram](https://millionrounds.com/workflow/manage-telegram-task-reminders-with-claude)
- [**Manage tasks & send scheduled reminders with Telegram Bot** 18 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/manage-tasks-and-send-scheduled-reminders-with-telegram-bot)
- [**Multi-channel AI appointment confirmation with ElevenLabs** 18 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/multi-channel-ai-appointment-confirmation-with-elevenlabs)
- [**Promote calendar events with OpenAI and Facebook** 18 steps · calls a model · Google Sheets, LinkedIn](https://millionrounds.com/workflow/promote-calendar-events-with-openai-and-facebook)
