Mail Instagram Gateway
This module connects Odoo Discuss to Instagram Direct Messages through OCA mail_gateway. Incoming DMs become gateway channels; replies from Discuss are sent back as Instagram text messages.
Table of contents
Configuration
The connector uses the Instagram API with Instagram Login (graph.instagram.com). Facebook-Login / Page-scoped Instagram is not supported.
Meta app
IMPORTANT — publish the Meta app (Live mode). Webhook verification can succeed while the app is still in Development, but Instagram Direct Messages are not delivered to Odoo until the app is published (switched to Live). Without Live mode you will see an integrated webhook and no inbound POSTs, and no Discuss channels. Do this before expecting real DMs to work. App Review / Advanced Access is also required for permissions that serve Instagram accounts the app does not own.
Use an Instagram professional account (Business or Creator).
Create a Meta app at developers.facebook.com/apps and add the Instagram Login product.
Request instagram_business_basic and instagram_business_manage_messages. Advanced Access is required to serve Instagram accounts the app does not own.
Publish the app (Development → Live). This step is mandatory for messaging delivery; skip it and inbound DMs will never arrive.
Odoo gateway
Enable developer mode, then go to Settings > Technical > Email > Gateway. (Technical is visible only in the developer mode.)
Create a gateway of type Instagram.
Fill in:
Token: Instagram user access token (sent as Authorization: Bearer).
Webhook Secret: Meta app secret (HMAC key for X-Hub-Signature-256). Copy it from the Meta app Settings > Basic > App Secret.
Instagram Security Key: a string you choose. You will enter the same value in Meta as the webhook verify token (hub.verify_token).
Instagram Account: professional account IGID used in the send URL.
Instagram Version: Graph API version without the v prefix (default 26.0).
Webhook Key: URL path segment of your choice. It becomes part of the webhook URL.
Webhook User: user that creates inbound messages.
Members: Discuss users who join new conversations.
Save. Webhook Key and Webhook User must be set or the Integrate Webhook button stays hidden.
Press Integrate Webhook on the gateway form (header). The state becomes pending. Meta’s verification GET is only accepted in this state.
Open the Instagram configuration tab on the same form. Copy Webhook URL. Odoo builds it as https://<your-odoo-host>/gateway/instagram/<webhook_key>/update. You do not get this URL from Meta.
The same Webhook URL field on the main form group is visible only in the developer mode. Use the tab; that copy is for operators.
Meta webhook
In the Meta app, open the Instagram Login product’s webhook / callback settings.
Callback URL: paste the Webhook URL copied from Odoo.
Verify token: paste the same string as Instagram Security Key.
Subscribe the ``messages`` field only.
Meta sends a GET to Odoo. On success the gateway state becomes integrated.
The webhook endpoint must be publicly reachable over HTTPS. Self-signed certificates are not accepted by Meta.
24-hour messaging window
Instagram only allows the professional account to message a user after that user has messaged it, and only for 24 hours after the user’s last message. Replies from Discuss outside that window are rejected by Meta. Anything that must be sent later has to go through another channel. A human-agent tag that extends the window is listed on the module roadmap and is not implemented here.
Usage
Incoming Instagram Direct Messages appear as Discuss channels of type gateway. The sender is a mail.guest until a user promotes them to a partner from the followers menu.
Replies typed in that Discuss channel are delivered as Instagram DMs (text only). Messages the professional account sends from the Instagram app are not duplicated into the channel.
Shares, story mentions and reels arrive as links in the message body, not as downloaded files. Images, videos, audio and files are downloaded and attached to the Discuss message.
Known issues / Roadmap
Outbound attachments / media upload.
Quick replies, icebreakers and the persistent menu.
HUMAN_AGENT tagging to reply after the 24-hour window: send messaging_type=MESSAGE_TAG with tag=HUMAN_AGENT. Meta documents this on the Page Messages API; only HUMAN_AGENT is available for Instagram Messaging, and the message may be sent within 7 days of the customer’s last message. Not implemented in 1.0.
Message reactions, read receipts, and the standby / handover protocol.
Facebook-Login Instagram (graph.facebook.com).
Bug Tracker
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.
Credits
Contributors
Cetmix OÜ https://cetmix.com
Maintainers
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_addon_mail_gateway_instagram-18.0.1.0.0.2-py3-none-any.whl.
File metadata
- Download URL: odoo_addon_mail_gateway_instagram-18.0.1.0.0.2-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c6d8126d21d5939a4b90a77a57c317518180abdaafb5ebbd873c374f13e164b
|
|
| MD5 |
e842b94af94116c6324d8948730ea634
|
|
| BLAKE2b-256 |
b56a69cc767829700dfdd5dc2853a53032596cfcde37fb309221b22af8101131
|