Skip to main content

Capture and Store CRM Contacts with Telegram & Gemini AI

Workflow preview

Workflow preview
100%
Capture and Store CRM Contacts with Telegram & Gemini AI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

What it does This workflow is an AI agent in the form of a Telegram bot. Its main purpose is to capture contact information and store it in a CRM . The agent supports multi modal inputs and can ext...

Best for

  • Lead Generation automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.telegram, n8n-nodes-base.datatable, n8n-nodes-base.crypto, n8n-nodes-base.if

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Capture and Store CRM Contacts with Telegram & Gemini AI
Workflow name
Capture and Store CRM Contacts with Telegram & Gemini AI

What it does

This workflow is an AI agent in the form of a Telegram bot. Its main purpose is to capture contact information and store it in a CRM. The agent supports multi-modal inputs and can extract contact details from text messages, voice recordings, and images (like photos of business cards).

The bot guides the user through data collection via a natural conversation, asks clarifying questions for missing information, and summarizes the extracted data for confirmation before saving. It also checks for duplicate contacts by email and gives users the choice to either create a new contact or update an existing one.

For simplicity, this example uses a Google Sheets document to store collected contacts. It can easily be replaced by a real CRM like HubSpot, Pipedrive, Monday, etc.

How to use the bot

Send contact details via text or voice, or upload a photo of a business card. The bot will show the extracted information and ask questions when needed. Once the bot confirms saving of the current contact, you can send the next one. Use the /new command at any moment to discard the previous conversation and start from scratch.

Requirements

  1. A Telegram bot Access Token
  2. Google Gemini API key
  3. Google Sheets credentials

How to set up

  1. Create a new Telegram bot (see n8n docs and Telegram bot API docs for details)
  2. Take webhook URL from the Telegram Trigger node (WEBHOOK_URL) and your bot's access token (TOKEN) and run curl -X POST "https://api.telegram.org/bot{TOKEN}/setWebhook?url={WEBHOOK_URL}"
  3. Create a new Google Sheets document with "Full name", "Email", "Phone", "Company", "Job title" and "Meeting notes" columns
  4. Configure parameters in the parameters node:
    • Set ID of the Google Sheets document
    • Set sheet name ("Sheet1" by default)
  5. Configure Google Sheets credentials for AI Agent's tools: Search for contact and Create new contact and Update existing contact.
  6. Add Google Gemini API key for the models ("AI Agent", "Transcribe audio", "Analyze image" nodes)

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 - Telegram Trigger

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

Block 2 - Sticky Note

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

Block 3 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 4 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 5 - Send a text message

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

Block 6 - Get sessionID

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

Block 7 - Generate sessionID

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

Block 8 - Upsert row(s)

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

Block 9 - Sticky Note1

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

Block 10 - If no sessionID or /new

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

Block 11 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 12 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 13 - Add sessionID to input

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 14 - Sticky Note2

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

Block 15 - parameters

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

Block 16 - Create new contact

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 17 - Update existing contact

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 18 - Search for contact

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 19 - Send "typing..."

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

Block 20 - Get audio file

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

Block 21 - Transcribe audio

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 22 - Process audio transcript

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

Block 23 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 24 - Process extracted data

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

Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Capture and Store CRM Contacts with Telegram & Gemini AI
Complexity advanced
Nodes 27
Categories Lead Generation, AI Chatbot
Author Vadim
Published 15 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9700/9700.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 Capture and Store CRM Contacts with Telegram & Gemini AI do?

What it does This workflow is an AI agent in the form of a Telegram bot. Its main purpose is to capture contact information and store it in a CRM . The agent supports multi modal inputs and can ext...

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 Lead Generation, AI Chatbot use case.