This module allows to respond telegram chats as a telegram bot.
This way, a group of users can respond customers or any other set of partners in an integrated way.
It is not intended to be integrated on default chatter as users don't need to review again when one has responded.
Table of contents
- Create a Bot on telegram https://core.telegram.org/bots
- Create a broker following the examples on https://github.com/tegin/telegram-broker with the TOKEN provided
- Access on debug mode
- Access Settings > Technical Settings > Email > Mail Gateway.
- Access Telegram and start a converstation with BotFather.
- Create a bot using the command /newbot. The system will ask for a bot name. Remember that it needs to end with the word bot.
- Copy the token to access the HTTP API to the token field.
- Define Webhook key an webhook secret of your choice in its corresponding field, in order to secure the connection.
- Press save button and the integrate webhook smart button will appear.
- Press the Integrate webhook button.
- If you want to add an extra layer of security, you can check Has New Channel Security and define a Telegram security key. New chats will be created only with the command /start SECURITY_KEY.
The Webhook functionality can only be used if your system is accessible from website. On local installations it might be problematic as Telegram will not be able to contact your system. In that case, you might need to create a telegram bot that will send data to you on an external process with the following code.
from telegram.ext import Filters, MessageHandler, Updater
import requests
dp = Updater(YOUR_TOKEN)
def message_callback(update, _context):
requests.post(YOUR_CONTROLLER, json=update.to_dict())
dp.dispatcher.add_handler(MessageHandler(Filters.all, message_callback))
dp.start_polling()
dp.idle()
- Access Gateway
- Wait until someone starts a conversation with your bot.
- Now you will be able to respond and receive messages to this person.
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- Creu Blanca
- Dixmit
- Enric Tobella <[email protected]>
- Olga Marco <[email protected]>
This work has been funded by AEOdoo (Asociación Española de Odoo - https://www.aeodoo.org)
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
This module is part of the OCA/social project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.