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 Integration Advanced v 18.0
  4. Sales Conditions FAQ

Telegram Integration Advanced

by Steven Marp
Odoo

$ 128.49

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
Odoo Apps Dependencies Discuss (mail)
Lines of code 1330
Technical Name sm_telegram
LicenseOPL-1
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 1330
Technical Name sm_telegram
LicenseOPL-1
  • Description
  • Documentation
  • License

Telegram Integration Advanced

Send Telegram messages, PDFs, images & scheduled notifications directly from any Odoo record

Module Video Overview

Your browser does not support the video tag.

Features

1 Create bots easily

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
Configure per model

2 Configure per model

Enable Telegram sending per Odoo model (Sale Order, Invoice, etc.). Whitelist allowed PDF reports, restrict which users can send, and set default templates — all from a single config screen.

3 Send from chatter

A Send Telegram button appears directly in the chatter of configured models. Open the wizard, pick recipients, write your message (or load a template), attach files, and send — without leaving the record.

Send from chatter
Dynamic Templates

4 Dynamic templates

Build reusable message templates with Jinja2 variables: {{ object.name }}, {{ partner.name }}, {{ company.name }}. Live preview & test render built-in. Supports Markdown & HTML formatting.

5 Inline keyboard buttons

Add clickable URL buttons directly in your Telegram messages: View Order, Pay Invoice, Visit Website. Configurable per template with row management.

Inline Keyboard Buttons
PDF and file delivery

6 PDF & file delivery

Attach QWeb PDF reports with one click. Send images as Telegram photos, other files as documents — the module detects the type automatically. Reports are whitelisted per model for security.

7 Schedule & auto-retry

Schedule messages for a future date/time. A background cron job sends them when due — and automatically retries failed deliveries up to a configurable max retry count. Never miss a message.

Schedule and auto-retry
Message Logs

8 Full delivery tracking

Every message is logged with complete details: recipient, status (sent/failed/scheduled), timestamps, error info. Manual retry from the log view. Chatter summary posted on the source document.

9 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.

Auto contact mapping
Bulk sending

10 Bulk sending

Send the same message to up to 50 recipients at once. Templates are rendered per-partner, so each recipient gets personalized content with their own name and details.

And much more...

Multi-Company

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

User Access Control

Restrict which users can send Telegram per model. If no users specified, everyone can send.

Secure Webhook

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

Template Preview

Live preview and one-click test render for templates. See exactly what your recipients will receive.

Manual Retry

Retry any failed message directly from the message log view. No need to recreate the message from scratch.

Global Settings

Configure default bot, enable/disable auto-retry, and set max retry count from Odoo’s Settings screen.

Chatter Audit Trail

After sending, a summary note is posted on the source document showing which recipients succeeded and which failed.

Markdown & HTML

Format messages in Markdown or HTML. Bold, italic, links, code blocks — all supported natively by Telegram.

Report per Template

Attach a PDF report action directly in the template. On send, the report is auto-generated and attached to the message.

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 Integration Advanced — Documentation

Table of Contents

  • 1. Getting Started
    • Prerequisites
    • Installation
  • 2. Creating a Bot
    • Step 1: Talk to BotFather
    • Step 2: Register Bot in Odoo
  • 3. Model Configuration
    • Setup
  • 4. Contact Mapping
    • How It Works
    • Partner Fields
  • 5. Sending Messages
    • From the Chatter
  • 6. Message Templates
    • Creating a Template
    • Available Variables
    • Inline Keyboard Buttons
  • 7. Scheduling & Auto-Retry
    • Scheduled Messages
    • Auto-Retry for Failed Messages
  • 8. Message Logs & Audit Trail
    • Log Fields
    • Chatter Audit Trail
  • 9. Technical Architecture
    • End-to-End Flow
    • Models
    • API Endpoints
    • Cron Jobs
  • Support

1. Getting Started

Prerequisites

Before installing, make sure your environment meets these requirements:

Warning

Telegram only accepts HTTPS webhook URLs. Your Odoo instance must be accessible via a public HTTPS domain.

Tip

If you are developing locally, use ngrok to create a temporary HTTPS tunnel to your local Odoo instance.

Installation

  1. Upload the sm_telegram module folder to your server's custom addons directory.
  2. Restart the Odoo service to detect the new module.
  3. Navigate to Apps menu, click Update Apps List.
  4. Search for "Telegram Integration Advanced" and click Install.

Note

After installation, a new Telegram top-level menu will appear in the main menu bar. All bot management, templates, model configs, and message logs are accessible from there.


2. Creating a Bot

To get started, you need to obtain an official Telegram Bot Token from BotFather.

Step 1: Talk to BotFather

  1. Open Telegram on your phone or desktop.
  2. Search for @BotFather and start a conversation.
  3. Send the /newbot command.
  4. Follow the instructions — choose a name and a username for your bot.
  5. BotFather will provide you with a unique API Token.

Important

Keep your token secure! Anyone with access to this token can control your bot. Never share it publicly or commit it to a public repository.

Step 2: Register Bot in Odoo

  1. Navigate to Telegram → Bots → New.

  2. Fill in the following fields:

    Token:Paste the API Token you received from BotFather.
    Company:Select the company this bot belongs to. Each company can have its own bot.
  3. Click the Verify Bot button.

    The system calls the Telegram getMe API to validate the token and automatically fetches the bot's name and username.

  4. Click the Setup Webhook button.

    This registers your Odoo server URL with Telegram via the setWebhook API. A cryptographically secure secret token is auto-generated for webhook validation.

Tip

You can see the bot status change to Verified and the webhook URL populated automatically. If verification fails, double-check your token and that web.base.url is set correctly in Settings → Technical → System Parameters.


3. Model Configuration

Before users can send Telegram messages from a specific model (e.g. Sale Order, Invoice), an administrator must enable it.

Setup

  1. Navigate to Telegram → Model Configuration → New.
  2. Configure the following fields:
    Model:Select the Odoo model (e.g. sale.order, account.move, res.partner).
    Allowed Reports:
     Whitelist which QWeb PDF reports can be sent via Telegram for this model. If left empty, all PDF reports for the model are available.
    Allowed Users:Optionally restrict which users can send Telegram messages for this model. If left empty, all users can send.
    Default Template:
     Optionally select a template that will be auto-loaded when a user opens the send wizard for this model.

Note

Once a model is configured, the "Send Telegram" button will automatically appear in the chatter of all records of that model.


4. Contact Mapping

Telegram uses chat IDs to identify users. The module handles mapping automatically.

How It Works

  1. Your customer opens Telegram and searches for your bot (e.g. @YourCompanyBot).
  2. They send the /start command.
  3. The webhook controller receives the update and automatically:
    • Extracts the Telegram username and chat_id from the message.
    • Searches for a res.partner with a matching telegram_username field.
    • Writes the telegram_chat_id on that partner record.

Tip

To prepare contacts, set the Telegram Username field on partner records (found in the Telegram tab on the partner form). When the customer sends /start, the mapping happens automatically — zero manual work.

Partner Fields

Two fields are added to res.partner:

Field Description
telegram_username The contact's Telegram username (without @)
telegram_chat_id Auto-populated when the contact sends /start to the bot

5. Sending Messages

From the Chatter

  1. Open any record (Sale Order, Invoice, Partner, etc.) that has a configured model.
  2. In the chatter, click the Send Telegram button.
  3. The Send Wizard opens with the following options:
    Recipients:Select one or more partners who have a telegram_chat_id. You can send to up to 50 recipients at once.
    Template:Select a pre-configured template, or leave empty to write a custom message. If the model has a default template, it is auto-loaded.
    Message:The message body. If a template is selected, it is rendered with Jinja2 variables and pre-filled here. You can still edit it before sending.
    Parse Mode:Choose between Markdown, HTML, or Plain Text formatting.
    Report:Optionally attach a QWeb PDF report (only whitelisted reports are shown).
    Attachments:Attach any ir.attachment files. Images are automatically sent as Telegram photos, other files as documents.
    Scheduled Date:Leave empty to send immediately, or set a future date/time for deferred delivery.
  4. Click Send.

Tip

After sending, a summary is posted as a chatter note on the source document, showing which recipients succeeded and which failed.


6. Message Templates

Templates let you create reusable, dynamic messages with variables and buttons.

Creating a Template

  1. Navigate to Telegram → Templates → New.
  2. Configure the following:
    Name:A descriptive name for the template (e.g. "Order Confirmation").
    Model:The Odoo model this template applies to.
    Body:The message body using Jinja2 template syntax.
    Parse Mode:Markdown or HTML for rich text formatting.
    Report:Optionally attach a PDF report action — it auto-generates on send.

Available Variables

These variables are available inside the template body:

Variable Description
{{ object }} The source record (e.g. the Sale Order)
{{ object.name }} Record name (e.g. SO001)
{{ partner }} The recipient partner record
{{ partner.name }} Partner name
{{ company }} Current company record
{{ company.name }} Company name
{{ user }} Current user record
{{ user.name }} Current user name

Example template body (Markdown):

*Order Confirmation* 🎉

Hello **{{ partner.name }}**,

Your order **{{ object.name }}** has been confirmed!

Total: {{ object.amount_total }} {{ object.currency_id.name }}

Thank you for your business.
— {{ company.name }}

Inline Keyboard Buttons

Add clickable URL buttons that appear below the message in Telegram:

  1. In the template form, go to the Buttons tab.
  2. Click Add a line and fill in:
    Label:The button text (e.g. "View Order")
    URL:The destination URL
    Row:Row number (buttons on the same row appear side by side)

Tip

Use Preview to see exactly how the rendered message will look, and Test Render to validate Jinja2 syntax before sending.


7. Scheduling & Auto-Retry

Scheduled Messages

Instead of sending immediately, set a scheduled date/time in the send wizard. The message will be saved with status "scheduled" and a background cron job will process it when the time comes.

Auto-Retry for Failed Messages

If a message fails to send (network error, Telegram API downtime, etc.), the system can automatically retry it.

Configuration: Navigate to Settings → General Settings → Telegram.

Setting Description
Default Bot Auto-selected when sending if no specific bot is chosen
Enable Auto-Retry Toggle automatic retry of failed messages on/off
Max Retry Count Maximum number of retry attempts (default: 3)

Note

You can also manually retry any failed message from the Telegram → Message Logs view by clicking the Retry button.


8. Message Logs & Audit Trail

Every Telegram message (sent, failed, or scheduled) is recorded in the Telegram → Message Logs view.

Log Fields

Field Description
Recipient The partner the message was sent to
Chat ID The Telegram chat ID used
Status draft / sent / failed / scheduled
Message Full message content
Bot Which bot was used
Source Record | Link to the Odoo document that triggered the send
Template Template used (if any)
Sent At / Scheduled At Timestamps
Error Error message (for failed deliveries)
Retry Count Number of retry attempts

Chatter Audit Trail

After every send operation, a summary note is automatically posted on the chatter of the source document. The note includes:

  • ✅ Recipients that received the message successfully
  • ❌ Recipients that failed, with error details

9. Technical Architecture

End-to-End Flow

┌─────────────┐     ┌──────────────┐     ┌─────────────────┐
│  BotFather   │────▶│  Odoo Bot    │────▶│  setWebhook     │
│  (get token) │     │  (verify)    │     │  (register URL) │
└─────────────┘     └──────────────┘     └─────────────────┘
                                                   │
                     ┌──────────────────────────────┘
                     ▼
┌────────────────────────────────────┐
│  /telegram/webhook/<secret>        │
│  (controller receives updates)     │
└────────────────────────────────────┘
                     │
         ┌───────────┴───────────┐
         ▼                       ▼
┌─────────────────┐   ┌──────────────────┐
│  /start command  │   │  Other messages   │
│  (map chat_id)  │   │  (future use)     │
└─────────────────┘   └──────────────────┘

┌─────────────────────────────────────────────────────┐
│  Send Wizard (from chatter)                         │
│  ┌─────────┐  ┌──────────┐  ┌─────────┐           │
│  │ Message  │  │ Template │  │ Report  │           │
│  │ (text)   │  │ (Jinja2) │  │ (PDF)   │           │
│  └────┬─────┘  └────┬─────┘  └────┬────┘           │
│       └──────────────┴─────────────┘                │
│                      │                              │
│              ┌───────┴───────┐                      │
│              ▼               ▼                      │
│     ┌──────────────┐ ┌──────────────┐              │
│     │ Send Now     │ │ Schedule     │              │
│     │ (Telegram    │ │ (cron job    │              │
│     │  API call)   │ │  picks up)   │              │
│     └──────┬───────┘ └──────┬───────┘              │
│            └────────┬───────┘                       │
│                     ▼                               │
│          ┌─────────────────┐                        │
│          │  Message Log    │                        │
│          │  (audit trail)  │                        │
│          └─────────────────┘                        │
└─────────────────────────────────────────────────────┘

Models

Model Purpose
telegram.bot Bot configuration (token, webhook, company)
telegram.model.config Per-model access rules (reports, users, templates)
telegram.template Message templates with Jinja2 and inline buttons
telegram.template.button Inline keyboard buttons for templates
telegram.message.log Message delivery log with status and retry tracking
telegram.send.wizard Transient model for the send wizard

API Endpoints

Endpoint Description
/telegram/webhook/<secret> Receives incoming Telegram webhook updates

Cron Jobs


Support

We provide free bug fixes and updates for this module.

If you encounter any issues or need assistance:

  1. Submit a support request through the Odoo Apps support page.
  2. Our team (the same developers who built the module) will respond promptly.

Important

Support is provided for clean Odoo installations. We cannot guarantee compatibility with heavily customized instances or conflicts with other third-party modules.

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