Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Discuss
  3. Telegram Connector - Base v 18.0
  4. Sales Conditions FAQ

Telegram Connector - Base

by Steven Marp
Odoo

$ 29.39

v 18.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 382
Technical Name sm_telegram_base
LicenseOPL-1
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 382
Technical Name sm_telegram_base
LicenseOPL-1
  • Description
  • Documentation
  • License

Telegram Connector - Base

Connect your Odoo instance to Telegram: bot management, partner mapping & secure webhook

Module Video Overview

Your browser does not support the video tag.

Features

1 Create & manage bots

Create and configure multiple Telegram bots directly within Odoo. Paste your BotFather token, verify the bot, and set up the webhook — all in one click. Supports multi-company: each company gets its own bot.

Create bots easily
One-click webhook setup

2 One-click verify & webhook

Click Verify Bot to validate your token via Telegram's getMe API. Then click Setup Webhook to register your Odoo URL with a secure, auto-generated secret token. Remove it anytime with one click.

3 Auto contact mapping

When a Telegram user sends /start to your bot, the webhook automatically maps their chat ID to the matching partner in Odoo. Zero manual setup for contacts. Just fill in the Telegram Username on the partner form.

Auto contact mapping
Partner Telegram fields

4 Partner Telegram fields

Two new fields added to every contact: Telegram Username (set manually) and Telegram Chat ID (auto-filled via /start webhook). Ready for any module that needs to send Telegram messages.

And more...

Multi-Company

Each company gets its own bot. The system auto-selects the correct verified bot for the current company.

Secure Webhook

Auto-generated secret token for webhook validation. Only verified requests from Telegram are processed.

Global Settings

Configure the default bot from Odoo’s Settings screen. Used by all add-on modules automatically.

API Helpers

Built-in methods: send_message(), send_document(), send_photo(). Ready for any custom integration.

Foundation Module

This is the base for the entire Telegram ecosystem. Install add-on modules for chatter sending, templates, scheduling & more.

Secure by Default

Bot tokens stored securely. Webhook URLs validated with secret tokens. Regular users get read-only access; admins get full control.

Telegram Module Ecosystem

Telegram Connector - Base (this module)
Telegram - Send Messages
Chatter button, send wizard, message logs, bulk send
Telegram Templates
Jinja2, inline buttons, preview
Telegram Scheduler
Send later, auto-retry, cron jobs

Support

We provide free bug fixes and updates for all our modules. If you need help, please submit a support request through the Odoo Apps support page. Our team is always ready to assist you.

Telegram Connector – Base

Table of Contents

  • Telegram Connector – Base
    • Overview
    • Prerequisites
    • Installation
    • Configuration
      • Creating a Telegram Bot
      • Adding the Bot in Odoo
      • Setting Up the Webhook
      • Global Settings
    • Partner / Contact Fields
      • Auto Contact Mapping via /start
    • Technical Architecture
      • Models
      • Key Methods on sm.telegram.bot
      • Webhook Controller
      • Security
    • Add-on Modules
    • Support
    • Changelog
      • 1.0.0

Overview

Telegram Connector - Base is the foundation module for the Odoo 18 Telegram ecosystem. It provides bot management, partner Telegram fields, a secure webhook endpoint, and global settings. Install this module first, then add the companion modules (Send Messages, Templates, Scheduler) for a complete integration.

Prerequisites

Before installing, make sure you have:

  1. A Telegram Bot created via @BotFather
  2. A publicly reachable URL for your Odoo instance (required for webhook)
  3. A valid SSL certificate (Telegram requires HTTPS for webhooks)

Installation

  1. Place the sm_telegram_base folder in your Odoo addons path.
  2. Update the module list:
    • Go to Apps → Update Apps List → click Update.
  3. Search for Telegram Connector – Base and click Install.

Configuration

Creating a Telegram Bot

  1. Open Telegram and search for @BotFather.
  2. Send /newbot and follow the prompts to choose a name and username.
  3. Copy the HTTP API Token provided by BotFather.

Adding the Bot in Odoo

  1. Navigate to Telegram → Bots.
  2. Click New.
  3. Fill in:
    • Name: A friendly label (e.g. "Production Bot")
    • Token: The token from BotFather
    • Company: The company this bot belongs to (multi-company support)
  4. Click Verify Bot. Odoo will call Telegram's getMe API. On success the bot's username is auto-filled and the state changes to Verified.

Setting Up the Webhook

  1. On the same bot form, click Setup Webhook.
  2. Odoo registers the webhook URL: https://<your-domain>/telegram/webhook/<bot_id>
  3. A secret token is auto-generated and stored on the bot record.
  4. Telegram will now push all incoming messages to your Odoo instance.

To remove the webhook, click Remove Webhook.

Global Settings

Go to Settings → Telegram section:

  • Default Bot: Select the bot to use across the system. Used as the fallback when no specific bot is configured elsewhere.

Partner / Contact Fields

Two fields are added to res.partner:

Auto Contact Mapping via /start

When a Telegram user sends /start to your bot:

  1. The webhook receives the message.
  2. Odoo searches for a partner whose telegram_username matches the sender's Telegram username.
  3. If found, the partner's telegram_chat_id is automatically filled in.

This means contacts only need to have their Telegram username entered in Odoo. After they send /start, the chat ID is populated automatically — no manual copy-pasting required.

Technical Architecture

Models

Model Table Description
sm.telegram.bot sm_telegram_bot Bot records & API methods
res.partner (inherit) res_partner Telegram fields on contacts
res.config.settings (inherit) (transient) Default bot global setting

Key Methods on sm.telegram.bot

  • action_verify_bot() – Calls getMe, stores bot_username, sets state.
  • action_setup_webhook() – Calls setWebhook with auto-generated secret.
  • action_remove_webhook() – Calls deleteWebhook.
  • send_message(chat_id, text, **kwargs) – Sends a text message.
  • send_document(chat_id, document, **kwargs) – Sends a file/document.
  • send_photo(chat_id, photo, **kwargs) – Sends a photo.
  • _telegram_request(method, **params) – Low-level API wrapper.
  • _process_webhook_update(data) – Handles incoming webhook payloads.
  • _get_default_bot() – Returns the verified bot for the current company.

Webhook Controller

Route: /telegram/webhook/<int:bot_id>

  • Method: POST
  • Auth: none (public endpoint)
  • Validates the X-Telegram-Bot-Api-Secret-Token header against the stored webhook_secret.
  • Delegates processing to sm.telegram.bot._process_webhook_update().

Security

  • Access rights: defined in security/ir.model.access.csv.
  • Admin users have full CRUD on sm.telegram.bot.
  • Regular users can read bot records but cannot modify them.
  • Bot tokens are stored in standard Odoo fields — not exposed in views for non-admin users.
  • Webhook secret token ensures only Telegram can call the endpoint.

Add-on Modules

This base module is designed to be extended. The ecosystem includes:

  1. Telegram – Send Messages (sm_telegram_core) - Chatter "Send Telegram" button - Send wizard with text, photo, document support - Model configuration (which models can send) - Message logs with delivery status
  2. Telegram Templates (sm_telegram_template) - Jinja2 message templates - Inline keyboard buttons - Live preview & test render
  3. Telegram Scheduler (sm_telegram_scheduler) - Send later (scheduled messages) - Auto-retry failed messages via cron - Configurable retry settings

Support

For bug reports or feature requests, please use the Odoo Apps support page or contact us through the store listing. We provide free bug-fix support for all our modules.

Changelog

1.0.0

  • Initial release
  • Bot management with verify & webhook
  • Partner Telegram fields (username + chat ID)
  • Auto contact mapping via /start
  • Global settings (default bot)
  • Multi-company support
  • Secure webhook with secret token validation
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with