OdooWiki OCA HUB

Mail Gateway

mail_gateway folder_open OCA/mail open_in_new
Uncategorised License: AGPL-3

This module will allow you to integrate an external chat system in your Odoo system. It requires extra modules with the specific configuration of each chat system, like mail_gateway_telegram or mail_gateway_whatsapp.

This way, a group of users can respond customers or any other set of partners within Odoo, but the messages will be sent through the external chat system.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

This module is the base for connecting external chat systems (like Telegram or WhatsApp) to Odoo. It lets a team chat with customers inside Odoo while messages travel through the external chat service.

This module does not connect to any chat service by itself; it provides the shared foundation that specific connector modules build on. It adds a new "Gateway" menu under the Email section where administrators configure a connection: a name, a secret token, the gateway type, a webhook key and secret, the user that will create incoming messages, the allowed members and the company.

  • On a gateway record, buttons let you integrate, update or remove the webhook, and the webhook URL is computed automatically.
  • Tokens and webhook keys must be unique, and a company rule keeps each gateway within its company.
  • A new channel type "Gateway" appears in Discuss, so conversations with external contacts show up as chat channels.
  • Each contact can be linked to one gateway channel per gateway, storing the external identifier used to recognise them.
  • When a message is posted in a gateway channel, a gateway notification is created and sent out automatically.
  • Incoming messages can be attached to any record that supports messages, and a message can be forwarded to a contact through a gateway.
  • A wizard turns an anonymous guest into a real contact, moving their channel membership and past messages to that contact.
  • Only members of the gateway user group can be invited to gateway channels, and they see a dedicated Gateway category in the Discuss sidebar.

Depends on

mail
Models and fields (15)
  • res.users · extends an existing modelgateway_ids
  • mail.guest · extends an existing modelgateway_id, gateway_token
  • mail.thread · extends an existing model
  • res.partner · extends an existing modelgateway_channel_ids
  • mail.gateway · new modelname, token, company_id, member_ids, webhook_key, webhook_url, gateway_type, webhook_secret, can_set_webhook, webhook_user_id, has_new_channel_security, integrated_webhook_state
  • mail.message · extends an existing modelgateway_type, gateway_message_id (Original gateway message), gateway_channel_ids, gateway_message_ids (Child gateway messages), gateway_thread_data, gateway_channel_data, gateway_notification_ids
  • discuss.channel · extends an existing modelcompany_id, gateway_id, channel_type, gateway_token (Gateway related Token), anonymous_name, gateway_message_ids, gateway_channel_token
  • mail.guest.manage · new modelguest_id, partner_id
  • mail.notification · extends an existing modelgateway_type, notification_type, gateway_channel_id, gateway_message_id, gateway_failure_reason
  • res.users.settings · extends an existing modelis_discuss_sidebar_category_gateway_open (Gateway Category Open)
  • mail.gateway.abstract · new model
  • mail.message.gateway.link · new modelmessage_id, resource_ref (Record reference)
  • mail.message.gateway.send · new modelmessage_id, partner_id, gateway_channel_id
  • res.partner.gateway.channel · new modelname, company_id, gateway_id, partner_id, gateway_token
  • mail.compose.gateway.message · new modelpartner_ids, attachment_ids, partner_cc_ids (Cc), partner_bcc_ids (Bcc), wizard_channel_ids, wizard_partner_ids, object_attachment_ids (Object Attachments)

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 19.0
  • Access in development mode
  • Go to Settings / Technical / Email / Gateway
  • Create a gateway. Follow the instruction of the specific tab in order to integrate it.
  • Start receiving notifications

When external messages are received, they will be directly sent to the discuss menu. Answering to these messages will send the answer to the external contact. We can assign this messages to any record using the message actions. Also, we can assign the sender to a partner using the followers menu and selecting the partner.

On a standard record associated to a partner with external chat, we can send messages to the external contact directly selecting the methods of the partner. To use this, we just need to use the

It is recomended to enable chatter notification to all users that will receive messages from gateways.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.