# Verify Telegram channel subscriptions with Postgres: n8n workflow

> Started by an incoming Telegram message, and works across Google Drive, Postgres and Telegram.

Source: https://millionrounds.com/workflow/verify-telegram-channel-subscriptions-with-postgres (Millionrounds; every figure on the page links to its filing or article)

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

# Verify Telegram channel subscriptions with Postgres

Started by an incoming Telegram message, and works across Google Drive, Postgres and Telegram. 41 steps, 8 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fverify-telegram-channel-subscriptions-with-postgres)

**41 steps** Large: read it before trusting it with anything live

**8** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Logic 11 Service 29

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

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **Variables TG** Set *Logic*
- 3 **Initialization** Set *Logic*
- 4 **Is Admin?** If *Logic*
- 5 **Define Type** Switch *Logic*
- 6 **Buttons** Switch *Logic*
- 7 **Get Bot Status** Postgres *Service*
- 8 **Update bot status on START** Postgres *Service*
- 9 **Define flow** Switch *Logic*
- 10 **Success** Telegram *Service*
- 11 **Commands** Switch *Logic*
- 12 **Add Channel** Postgres *Service*
- 13 **Get Channels** Postgres *Service*
- 14 **Referal?** If *Logic*
- 15 **Get Channels** Postgres *Service*
- 16 **Request Add Channel** Telegram *Service*
- 17 **Request Delete Channel** Telegram *Service*
- 18 **Request New Add Channel** Telegram *Service*
- 19 **Channel Exists** Telegram *Service*
- 20 **If** If *Logic*
- 21 **Welcome message Referal** Telegram *Service*
- 22 **Welcome message Manager** Telegram *Service*
- 23 **Add Divide Channels** Summarize *Service*
- 24 **Update bot status on CHECK SUBSCRIPTION REQUEST CHANNEL** Postgres *Service*
- 25 **Update bot status on CHECK SUBSCRIPTION REQUEST CHANNEL1** Postgres *Service*
- 26 **Delete Channel** Postgres *Service*
- 27 **Channel Not Exists** Telegram *Service*
- 28 **Update bot status and referal** Postgres *Service*
- 29 **Upsert bot status on START** Postgres *Service*
- 30 **Channels** Telegram *Service*
- 31 **Request New Delete Channel** Telegram *Service*
- 32 **Get Referal** Postgres *Service*
- 33 **Get Channels** Postgres *Service*
- 34 **Get Subscription statuses** Telegram *Service*
- 35 **Union statuses** Aggregate *Logic*
- 36 **Check** If *Logic*
- 37 **Get File** Google Drive *Service*
- 38 **Check success** Telegram *Service*
- 39 **Check failed** Telegram *Service*
- 40 **Download File** Google Drive *Service*
- 41 **Check success + File** Telegram *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 41, with 8 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Postgres, Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

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

What starts it?

It starts on an incoming Telegram message.

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?

Take your time. At 41 steps it is large: read it before trusting it with anything live.

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 41 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%2Fverify-telegram-channel-subscriptions-with-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.

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

## Workflows like it

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

- [**Create & share AI videos with Telegram and Gemini** 41 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-and-share-ai-videos-with-telegram-and-gemini)
- [**Create and publish UGC social videos from Telegram with OpenAI** 41 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-and-publish-ugc-social-videos-from-telegram-with-open)
- [**Generate monthly SEO analytics reports with Search Console** 41 steps · calls a model · Discord, Google Sheets](https://millionrounds.com/workflow/generate-monthly-seo-analytics-reports-with-search-console)
- [**Host a Telegram AI bot with a local model and Redis** 41 steps · calls a model · Redis, Telegram](https://millionrounds.com/workflow/host-a-telegram-ai-bot-with-a-local-model-and-redis)
- [**Automated SEO keyword & SERP analysis with Google Drive** 40 steps · Google Drive, Google Sheets](https://millionrounds.com/workflow/automated-seo-keyword-and-serp-analysis-with-google-drive)
- [**Cross-platform content publisher: Telegram** 40 steps · LinkedIn, Telegram](https://millionrounds.com/workflow/cross-platform-content-publisher-telegram)
