| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• Discuss (mail) • Calendar (calendar) • Contacts (contacts) |
| Community Apps Dependencies | Show |
| Lines of code | 4712 |
| Technical Name |
us_telegram |
| License | OPL-1 |
| Website | https://unitsoft.com.ua/ |
| Versions | 16.0 17.0 18.0 19.0 |
Telegram Integration powered by UnitSoft
Communicate with Telegram users directly within Odoo
Features
1. Convenient communication in Odoo
Chat with your Telegram customers directly in Discuss. Get more options for working with leads, partners, and session statuses.
2. Easy Bot Creation
Create and configure multiple Telegram bots directly within the system.
3. Interaction Flows
Build your own communication flow with users using scripts with step-by-step logic.
4. Chatter
Send and receive Telegram messages directly from the chatter of any Odoo document (Leads, Orders, etc.).
5. Operator Management
Monitor operator activity, follow specific channels, and manage agent workloads efficiently.
6. Customer Session Tracking
Track all client sessions, bot interactions, and operator responses in a centralized history.
Step-by-Step Instruction
1. Creating a Bot in Telegram
To get started, you need to obtain an official Telegram Bot Token from the BotFather. Follow these steps:
- Search for @BotFather in your Telegram app.
- Send the
/startcommand to begin the interaction. - Send
/newbotand follow the instructions to name your bot.
Once the process is complete, BotFather will provide you with a unique API Token. This token is required to connect Odoo to the Telegram API.
2. Module Deployment
To ensure messengers work correctly in your system, you need to have the following modules: us_messenger and us_telegram.
Library dependency: This module requires the pyTelegramBotAPI library to be installed on your environment.
Deployment Instructions
Please note that installing these modules through the standard Odoo interface (Apps → Import Module) will not work for the initial setup.
The correct way to install these modules is as follows:
- Upload the module folders directly to your server's custom addons directory.
- Restart the Odoo service via terminal to allow the system to detect the new files.
3. Module Activation
After installing the module, navigate to Apps menu and search for "Telegram Integration". Click Activate to activate the module in your Odoo instance.
4. Creating a New Bot
Once all the necessary modules are activated, we can create a bot in our system. To do this, go to the Messengers menu and click the New button in the upper-left corner. Now we see the form for a new bot. To launch and continue working with the bot, you need to fill in the basic bot fields. Let's take a look at these fields:
The type of bot you are creating. In our case, you need to select Telegram. If you are using integration modules with other messengers, there may be other options here.
Insert the API Token you received from @BotFather.
In this field, you can select a script with specific steps for user interaction with the bot. In the script, you can configure the receipt of email, phone number, connection to the operator, as well as sending buttons with a choice of answer options. If you leave this field blank, a available operator will be added to the channel with the user, without any intermediate steps. We will talk about scripts in more detail later.
An optional field for storing a link to the bot, useful if many bots are used in the system and it is necessary to understand which Telegram bot corresponds to our system bot.
In the Operators section, you can specify system users among whom an automatic search for an available operator will be performed. Then, such a user is added to the channel with the client for further communication. The Priority field allows you to control the selection of available operators. A user with a higher priority will only be selected if all other operators with a lower priority already have more than 5 open channels, or if there are no available operators. The User nickname field should be highlighted separately. The bot settings allow you to sign the author's name in messages that will be sent to the client. In User nickname, you can write the signature that you want your clients to see. If the field is empty, the user's name will be used.
5. Other Useful Parameters
Great, we've filled in all the important fields, now let's take a look at the other bot settings in Parameters page:
When executing script steps, the messenger user's language is taken into account in order to correctly determine the language of the text steps. Sometimes users may have a language that is not activated in our system, in which case the default language from this field will be selected.
If enabled, the author's name will be added at the end of the message, so the messenger client will better understand who they are communicating with.
Template for creating a channel name in Discuss. Consists of the messenger username and bot name.
Determines whether bot operators can assign channels where they are defined by the operator to other operators. If disabled, only the administrator can change the operator.
If enabled, when a messenger user sends a message (without explicit reply) and the last message in the channel was from a document chatter, the message will be duplicated to that document's chatter.
Now that we have finished configuring all the fields, we can click the Run Now button to start the bot. If everything was set up correctly, a notification confirming the successful bot launch should appear in the upper corner of the screen.
6. User Interaction With The Bot
At this stage, Telegram users can already contact our bot. Here's what interaction with the bot looks like from the client's side in Telegram and the operator's side in Odoo.
As we can see, the client has reached the step of connecting with an operator, so the system searched for an available operator, which turned out to be Mithell Admin, and added him to the channel. Once the operator has communicated with the client, he can click the End Session button, after which the operator will be removed from the channel, and the client will continue to the next step of the script.
7. Channel Statuses
Channel statuses are usually accompanied by a color change or the addition of an icon in the Discuss channel list. The operator can change the status depending on the current state of the channel. Options include waiting for a customer response or seeking help, which is used when the operator has added another system user. In this case, the user will see the channel highlighted in blue. Without Operator highlights the channel in orange and is used when no free operator could be found. This may be the case if the request was made outside of working hours and no users were online. In this case, the system adds all operators to the channel, and the first one to come online can click the Become Operator button to become an operator and exclude other operators from the channel.
8. Telegram Scripts
The Telegram messenger integration module allows you to build scripts with step-by-step interaction between the bot and the customer. Each step of the script is responsible for one message sent to Telegram. After installing the module, you will have a demo script so that you can better familiarize yourself with the work and capabilities of scripts.
9. Step Types
Each step has its own type and defines the logic of interaction between the bot and the user. Here are the types of steps that will be available in the Telegram script:
Sending a regular text message. Please note that this step does not require a response from the user, so if you have two text steps in a row, they will both be sent at once.
Receiving customer email. The step waits for the customer to send email. If the email is invalid, the step will ask to enter the email again.
Step is waiting for user input.
Step awaits receipt of the phone number. Please note that there is also another field in the step, Apply For Partner. If it is enabled, the customer will be able to transfer the number by clicking on the button, and the number will also be saved immediately in the partner card. If the field is disabled, the customer will need to enter the number manually. It is recommended to keep this option enabled if we expect the customer to enter their number, as in this case we can be sure that the number belongs to this user.
At this step, a search for an available operator is performed, and it is added to the channel. Note that when the client is at this step, the other steps are not performed, since all text or commands go to the channel with the operator.
A special Telegram step that sends text with attached buttons to Telegram. When the user clicks on one of the response buttons, we can move on to other steps. This step can be used as a poll or to build branches in the script.
10. Script Step Example
Let's look at an example of fields in a step with the Question Selection type:
Required field for each step. Contains text that will be sent to the customer.
The step can send a message about the user's successful response, or vice versa, if the user has entered the wrong answer. The message about the successful completion of the step is optional and can be left blank.
The execution of a step can be linked to a command. Note that the first step of the script must be linked to the /start command.
When a user changes the order of steps or creates new steps in a script, the steps are recalculated to automatically determine the next step for each step. If this field is enabled, the next step will not be determined for the current step.
A special field for a step with the Question Selection type. Answer Text will contain the text in the button with the answer option.
If the user has selected an option, we can specify the next step to be taken. It is also possible to create a survey without specifying the next steps in all answer options, in which case the next step specified in the step itself will be performed.
Support
We provide free bug fixes and updates for all our modules for 1 year after purchase.
The warranty is for a clean installation of Odoo.
If you need help, please submit a request through our Support Portal at https://unitsoft.com.ua/support. Our support team, which consists of the developers who created the product, is always ready to help you.
We will not provide support (for free) if our modules do not work on your server or conflict with other modules.
We are ready to consider your requests regarding the functionality of our modules, and if they prove useful, we can take them into account when releasing new versions.
We also provide all types of Odoo support services, such as installing Odoo on your server, maintaining your Odoo server, custom development.
We invite you to familiarize yourself with our support packages here: https://unitsoft.com.ua/services-plan
Our Odoo Apps
Telegram Integration
Installation
- Install this module in according to us_messenger Documentation
Configuration
In Telegram
- Send message /newbot to @BotFather and follow further instructions to create a bot and get its token
In Odoo
- Activate Developer Mode
- Open menu [[ Settings ]] >> Technical >> Parameters >> System Parameters
- Check that parameter web.base.url is properly set and it's accessible over internet (it should not be a localhost). Also, telegram accepts https addresses only (i.e. not http). If you can use only localhost, use ngrok
- Open menu [[ Messengers ]] >> Messengers
- Select Kanban card with telegram icon and name 'Enter_bot_name' project
- Enter token from @BotFather to field token
- Enter bot name and select the operators with which the user will contact
- Unarchive the project
- Click button [Run Now] in the upper left corner
Usage
Conversation in any document where there is a chatter
In Odoo:
- Make sure that in the [[ Messengers ]] >> Messengers >> <Your bot name> >> Parameters you have 'yes' written in DUPLICATE_MESSAGE_BY_ANSWER
- Add followers to chatter by clicking on button 'Add followers'. Select only parent contacts (without any bot name)
- Click on button 'Send Message'. Select to whom and in which messenger to send a message. Write message and send. Note: the message will be sent not only in the selected messenger but also by mail. To disable sending by mail you can click button Followers, select follower, click 'Edit subscription', and disable 'Discussions' and enable 'Note'
- In [[ Discuss ]] menu you will see the message from document with message with signature from which document it was written
In Telegram:
- RESULT: A new message will appear
- Answer on this message. Note: Reply to a message by clicking the appropriate button
In Odoo:
- RESULT: the message from Telegram you will see in chatter document
File sending and receiving
The operator has the ability to send not just text messages, but also messages with attachments.
- The Telegram Bot API has a limit on the files sent through the bot:
- The operator cannot send to Telegram user more than 10 MB for photos and 50 MB for other files.
- Also, the operator cannot receive files larger than 20 MB from a Telegram user.
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