How to add Microsoft Teams to Odoo
Short answer
Odoo has no deep native Teams integration, so you build it: an Odoo automated action or scheduled job sends adaptive cards to a Teams channel through a workflow webhook or a bot, and button clicks call Odoo's external API to approve or reject. Entra ID can handle single sign-on to Odoo separately.
Many manufacturers run Microsoft 365 for office staff and Odoo for operations. Approvals pile up in Odoo notification emails because buyers and plant managers spend their day in Teams, not in the Odoo inbox.
The fix is not to replace Odoo's Discuss app but to push the few decisions that block work into Teams, with enough context to decide, and to write the decision back to the record. The hard parts are identity mapping and keeping the card honest when the record changes after it was sent.
Microsoft has been moving Teams connectors toward Workflows and bot-based apps, so confirm the current supported mechanism in your tenant before choosing the webhook route.
What teams use it for
Purchase order approvals
Post an adaptive card for a purchase.order above the approval limit with vendor, total and lines, with Approve and Reject buttons that call Odoo.
Manufacturing exception channel
Send late or blocked mrp.production and mrp.workorder alerts to a plant channel, one thread per order, with a link back to the form.
Inventory shortage alerts
When stock.quant free quantity for a component drops below its reorder rule, notify purchasing with the open demand and expected receipts.
Sales order handoff
Announce confirmed sale.order records to a planning channel with delivery dates so production and sales share one view.
Expense and timesheet approvals
Route hr.expense or timesheet approvals to line managers in Teams instead of waiting for an Odoo email.
Odoo integration surface
- Automated actions (base.automation) and ir.cron scheduled actions to detect events and call out over HTTP; recent versions add webhook-type actions, older ones use a Python server action.
- External API for callbacks: XML-RPC (/xmlrpc/2/object), JSON-RPC (/jsonrpc), plus a newer JSON-2 endpoint on recent versions. Use an API key for a service user.
- Approval models: purchase.order button_approve, and Odoo Studio approval rules on custom flows. Call the model method rather than writing state fields directly.
- OAuth and SSO: Odoo supports OAuth providers, so Microsoft Entra ID sign-in is configured under authentication settings; this is separate from Teams messaging.
- mail.thread chatter to log who approved and when, so the audit trail stays in Odoo.
How it works
- 1
Choose Teams delivery method
Simple alerts can use a channel workflow webhook. Interactive approvals with identity need a Teams bot or app registered in Entra ID.
- 2
Map users
Match Teams users to Odoo res.users by email or UPN so a click is attributed to the right person and their access rights apply.
- 3
Detect the event
Use an automated action on state change or a scheduled action that polls with a search_read and a last-seen marker to avoid duplicates.
- 4
Build the adaptive card
Include record reference, amount, requester and a deep link. Keep the card small and put the record version in the action payload.
- 5
Handle the click
Your bot endpoint validates the Teams token, re-reads the record, checks it is still pending, and calls the Odoo approval method as that user or a mapped service identity.
- 6
Update the card
After the action, replace the card with the outcome so a second approver does not click a stale button.
Example flows
PO approval in Teams
Trigger: A purchase order enters the to-approve state.
- Odoo action posts the PO summary to your bot service.
- The bot sends an adaptive card to the approver's chat.
- Approver clicks Approve; the bot re-checks the PO and calls Odoo.
- Odoo confirms the order and logs the approver in the chatter.
- The card is updated to show the result.
Result: Approvals happen in minutes without the approver opening Odoo.
Daily late-orders digest
Trigger: A scheduled action runs at the start of the shift.
- It queries open manufacturing orders past their scheduled date.
- It groups them by work center.
- It posts one card per supervisor channel with links.
Result: Each team starts the day with its own exception list.
Keeping data on-prem
Teams is a Microsoft cloud service, so any message to it leaves your network, even if Odoo is on-prem. Keep the integration service inside your network or private cloud, have it call Odoo over the internal API, and only make an outbound HTTPS call to Microsoft, with the bot messaging endpoint exposed through a reverse proxy. Limit card content to references and status so no pricing or drawings are posted into chat history. If plant networks are segmented or air-gapped, Teams will not reach them, and Odoo's own notifications or a local chat tool is the realistic option. Entra ID sign-in for Odoo can be combined with on-prem Odoo through standard OAuth, as long as users can reach Microsoft login endpoints.
Security checklist
- Validate the Bot Framework token on every inbound request and check the tenant id.
- Execute approvals as the mapped Odoo user so record rules and approval limits still apply.
- Re-read the record before acting; never trust amounts carried in the button payload.
- Restrict the Entra app registration to required permissions and rotate secrets on a schedule.
- Keep cards free of sensitive attachments; link to Odoo behind login instead.
Ways to get it done
Webhook alerts only
Effort: A few days including the Odoo automated action.
One-way notifications to a channel with no approval buttons.
Custom Teams bot and Odoo API service
Effort: Two to four weeks including Entra registration and testing.
Interactive approvals with per-user identity and audit.
Partner build with Netray
Effort: Several weeks depending on scope and hosting.
When you also want natural-language questions to Odoo from Teams answered by a private model.
Pitfalls
- !Using a retired connector type; confirm what your tenant still supports before building.
- !Approving from a stale card after the PO was changed or already approved.
- !Mapping users by display name instead of UPN or email, causing wrong attribution.
- !Running the integration under one admin account, which bypasses approval limits.
- !Flooding channels; batch low-priority alerts into a digest.
Frequently asked questions
Does Odoo have a native Microsoft Teams connector?
Not a full one. Odoo integrates with Microsoft Outlook for mail and calendar and supports Microsoft sign-in, but Teams messaging and approvals are normally built with webhooks or a bot calling Odoo's external API. Check your version and app store in case a community module fits.
Can approvers approve directly from Teams?
Yes, with a bot or app that sends adaptive cards with action buttons. The click goes to your service, which calls the Odoo approval method for that user. Simple channel webhooks cannot reliably identify who clicked, so they suit notifications only.
Will this work with Odoo Community?
Yes. The external API and server actions are available in Community, though some automation features such as Studio are Enterprise only. You may write the trigger logic as a small custom module or poll from the integration service.
How do we avoid duplicate alerts?
Store a marker on the record or in the service for each event sent, such as the record id and state change timestamp. Automated actions can fire more than once on edits, so make the sender idempotent rather than relying on the trigger.
Can we ask Odoo questions from Teams?
Yes, with a bot that translates questions into read-only API calls and returns answers with the query shown. For sensitive data the language model can be a private open-weight model so order and cost data does not leave your environment.
Want Microsoft Teams working on your Odoo?
A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.
Get a free assessment