# Assistant for Telegram chat with OpenAI and Airtable: n8n workflow

> Started by an incoming Telegram message, and works across Airtable and Telegram. 29 steps, 3 branches, 5 loops or waits: large, and worth reading before you...

Source: https://millionrounds.com/workflow/assistant-for-telegram-chat-with-openai-and-airtable (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Assistant for Telegram chat with OpenAI and Airtable

Started by an incoming Telegram message, and works across Airtable and Telegram. 29 steps, 3 branches, 5 loops or waits: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fassistant-for-telegram-chat-with-openai-and-airtable)

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

**3** Branches: places the flow splits

**5** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 13 Service 15

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

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **Configuration** Set *Logic*
- 3 **Telegram** Telegram *Service*
- 4 **Check Thread Exists** Airtable *Service*
- 5 **Thread Exists** If *Logic*
- 6 **OpenAi Create Thread** Http Request *Service*
- 7 **OpenAi add message** Http Request *Service*
- 8 **Save Thread to Database** Airtable *Service*
- 9 **Run The Thread** Http Request *Service*
- 10 **Run the Thread** Http Request *Service*
- 11 **Get Run** Http Request *Service*
- 12 **Completed, Action or Inprogress** Switch *Logic*
- 13 **Get Last Message** Http Request *Service*
- 14 **Select Function** Switch *Logic*
- 15 **Wait1** Wait *Logic*
- 16 **Wait** Wait *Logic*
- 17 **Response** Set *Logic*
- 18 **HTTP Request** Http Request *Service*
- 19 **HTTP Request1** Http Request *Service*
- 20 **Execute Workflow** Execute Workflow *Logic*
- 21 **Telegram1** Telegram *Service*
- 22 **Code1** Code *Logic*
- 23 **Code** Code *Logic*
- 24 **Submit Data Function 3** Http Request *Service*
- 25 **Submit Data** Http Request *Service*
- 26 **Submit Data1** Http Request *Service*
- 27 **Wait4** Wait *Logic*
- 28 **Wait2** Wait *Logic*
- 29 **Wait3** Wait *Logic*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 29, with 3 branches, 5 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Airtable, Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Airtable 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 29 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 29 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%2Fassistant-for-telegram-chat-with-openai-and-airtable)
- **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.

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

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**AI chatbot call center: Telegram call in with Postgres** 29 steps · Postgres, Redis](https://millionrounds.com/workflow/ai-chatbot-call-center-telegram-call-in-with-postgres)
- [**AI chatbot call center: demo call back with Postgres and Redis** 29 steps · Postgres, Redis](https://millionrounds.com/workflow/ai-chatbot-call-center-demo-call-back-with-postgres-and-redi)
- [**Create and manage ERC-20 tokens with Telegram and 1Shot API** 29 steps · Telegram, n8n data table](https://millionrounds.com/workflow/create-and-manage-erc-20-tokens-with-telegram-and-1shot-api)
- [**Match teacher substitutes and send notifications with OpenAI** 29 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/match-teacher-substitutes-and-send-notifications-with-openai)
- [**Monitor favorite YouTube channels with RSS** 29 steps · calls a model · Gmail, RSS](https://millionrounds.com/workflow/monitor-favorite-youtube-channels-with-rss)
- [**Process Telegram image albums with Data Tables Cache** 28 steps · Telegram, n8n data table](https://millionrounds.com/workflow/process-telegram-image-albums-with-data-tables-cache)
