Skip to main content

Telegram bot starter template setup & AI agent chatbot

Workflow preview

Workflow preview
100%
Telegram bot starter template setup & AI agent chatbot preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Telegram Bot Starter template workflow + n8n AI Agent Chatbot provides a foundational setup for creating powerful Telegram bots with n8n. It handles incoming messages, photos, files, and voice note...

Best for

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

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.set, n8n-nodes-base.telegram, n8n-nodes-base.stickynote, n8n-nodes-base.switch, n8n-nodes-base.if, n8n-nodes-base.googlesheets, n8n-nodes-base.executeworkflow

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Telegram bot starter template setup & AI agent chatbot
Workflow name
Telegram bot starter template setup & AI agent chatbot

Telegram Bot Starter template workflow + n8n AI Agent Chatbot

provides a foundational setup for creating powerful Telegram bots with n8n. It handles incoming messages, photos, files, and voice notes, making it an excellent starting point for developers looking to create bots for customer engagement, support, or interactive services.

Sign up to n8n now β†’ and try it!

Key Features:

  • Dynamic Message Handling: Respond to text messages, photos, files, and more.
  • Modular Design: Easily integrate additional workflows such as user registration, payment modules, or custom commands.
  • Error Handling: Ensure the bot gracefully manages errors and user inputs.

Extensibility:

This workflow is the base for building any Telegram bot. Additional modules, such as a user registration module, payment integration, and user profile management, are available for easy connection to expand the bot’s functionality.

Who Can Use This Workflow?

  • Developers looking for a quick way to build and customize Telegram bots.
  • Businesses and service providers who need customer interaction automation.

Setup Instructions:

  1. Replace Telegram credentials with your own API credentials.
  2. Customize responses for different message types (text, photo, file).
  3. If integrating with external services (like Google Sheets), update the necessary credentials and links.

UPDATES:

πŸ”₯ Get the most up-to-date and expanded version β†’

June 25:

  • New! AI Agent + Setup Instructions
  • Simple setup instructions and examples are included inside the workflow as sticky notes.

Sep 24:

  • Improved message handler: Updated logic to handle various types of messages using Switch (text, photo, file, voice, and callback).
  • Payment processing: Added new nodes for sending invoices and handling payments via Telegram

Aug 24:

  • Changed processing of system events: β€œnew user” and β€˜user who blocked bot’ events

Please reach out to Victor if you need further assistance with your n8n workflows and automations! Sign up to n8n β†’, you have to try it!

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

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

Block 2 - Global data

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

Block 3 - Telegram1

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

Block 4 - Telegram2

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

Block 5 - Telegram3

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

Block 6 - Telegram4

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

Block 7 - Sticky Note

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

Block 8 - Sticky Note1

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

Block 9 - Sticky Note2

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

Block 10 - Sticky Note3

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

Block 11 - Sticky Note4

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

Block 12 - Telegram5

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

Block 13 - Switch_MessageType

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

Block 14 - Sticky Note5

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

Block 15 - Telegram6

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

Block 16 - Menu

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

Block 17 - Command?

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

Block 18 - Change status

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.4

Block 19 - Start bot?

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

Block 20 - Register

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

Block 21 - Payment Handler

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.1

Block 22 - Trigger Data for Payment

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

Block 23 - Trigger Data for Register

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

Block 24 - Switch

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

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

3. Summary Table

Workflow Telegram bot starter template setup & AI agent chatbot
Complexity advanced
Nodes 48
Categories Support Chatbot, AI Chatbot
Author Victor Gold
Published 04 Sept 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2402/2402.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 Telegram bot starter template setup & AI agent chatbot do?

Telegram Bot Starter template workflow + n8n AI Agent Chatbot provides a foundational setup for creating powerful Telegram bots with n8n. It handles incoming messages, photos, files, and voice note...

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