# Capture and Store CRM Contacts with Telegram and Gemini: n8n workflow

> Started by an incoming Telegram message, and works across Google Sheets, Telegram and n8n data table.

Source: https://millionrounds.com/workflow/capture-and-store-crm-contacts-with-telegram-and-gemini (Millionrounds; every figure on the page links to its filing or article)

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

# Capture and Store CRM Contacts with Telegram and Gemini

Started by an incoming Telegram message, and works across Google Sheets, Telegram and n8n data table. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 22 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcapture-and-store-crm-contacts-with-telegram-and-gemini)

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

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 5 Logic 7 Service 9

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

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 3 **Simple Memory** Memory Buffer Window *Model*
- 4 **Create new contact** Google Sheets Tool *Service*
- 5 **Update existing contact** Google Sheets Tool *Service*
- 6 **Search for contact** Google Sheets Tool *Service*
- 7 **parameters** Set *Logic*
- 8 **Send "typing..."** Telegram *Service*
- 9 **AI Agent** Agent *Model*
- 10 **Add sessionID to input** Merge *Logic*
- 11 **Get sessionID** Data Table *Service*
- 12 **Send a text message** Telegram *Service*
- 13 **Switch** Switch *Logic*
- 14 **If no sessionID or /new** If *Logic*
- 15 **Get audio file** Telegram *Service*
- 16 **Analyze image** Google Gemini *Model*
- 17 **Process text input** Code *Logic*
- 18 **Generate sessionID** Crypto *Service*
- 19 **Transcribe audio** Google Gemini *Model*
- 20 **Process extracted data** Code *Logic*
- 21 **Upsert row(s)** Data Table *Service*
- 22 **Process audio transcript** Code *Logic*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 22, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, Telegram, n8n data table
- **Model:** Gemini
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets and Telegram accounts, and a key for Gemini. 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?

Yes. It calls Gemini. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 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 22 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%2Fcapture-and-store-crm-contacts-with-telegram-and-gemini)
- **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 Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

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

- [**Track competitor risk from Gmail and webhooks with Groq** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/track-competitor-risk-from-gmail-and-webhooks-with-groq)
- [**Automate AI Video Production Pipeline with OpenAI and Fal.AI** 23 steps · calls a model · Google Sheets, YouTube](https://millionrounds.com/workflow/automate-ai-video-production-pipeline-with-openai-and-fal-ai)
- [**Predict customer churn with Google Sheets** 23 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/predict-customer-churn-with-google-sheets)
- [**Send sales forecast charts and answer Q&A on WhatsApp** 23 steps · calls a model · Google Sheets, WhatsApp](https://millionrounds.com/workflow/send-sales-forecast-charts-and-answer-q-and-a-on-whatsapp)
- [**n8n cheatsheet for data pipeline with Gemini and OpenAI** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/n8n-cheatsheet-for-data-pipeline-with-gemini-and-openai)
- [**Send daily stock and sales profit reports with Google Sheets** 20 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/send-daily-stock-and-sales-profit-reports-with-google-sheets)
