ml-connector
OdooHubSpot

Odoo and HubSpot integration

Odoo runs your back-office finance, purchasing, and HR. HubSpot manages your sales pipeline, customers, and revenue data. Connecting the two keeps customer records, deal tracking, and billing information in sync without manual entry or double-entry work. New customers in Odoo appear as contacts in HubSpot, invoices sync as revenue records, and purchase orders flow into deal timelines so your sales team sees the full customer relationship.

How Odoo works

Odoo exposes accounting, purchasing, inventory, HR, and CRM records through XML-RPC over HTTP POST (all Odoo versions) and JSON-2 REST (Odoo 19 and later). It authenticates with an API key and username, and uses write_date filtering for efficient polling. Odoo Online and Odoo.sh are SaaS, while self-hosted instances run on customer infrastructure. External API access requires a Custom pricing plan. Webhooks are available in Enterprise + Studio but not production-grade; polling is the standard integration pattern. API calls respect the integration user's access rights and record rules.

How HubSpot works

HubSpot exposes contacts, companies, deals, invoices, orders, line items, and payments through its REST API at https://api.hubapi.com. Authentication uses private app access tokens (Bearer format) for server-to-server integration. HubSpot enforces strong association rules: invoices must link to contacts and include line items, products cannot be directly associated to other objects, and batch operations are capped at 100 records per request. Cursor-based pagination has a 200-record limit per page. Webhooks are available but require a separate Public App registration. Rate limits vary by plan tier, from 100 to 190 requests per 10 seconds.

What moves between them

The integration runs primarily Odoo to HubSpot. Odoo partners sync to HubSpot contacts and companies; invoices, sales orders, and purchase orders sync as HubSpot deals or commerce objects. Odoo accounting data can flow to HubSpot timelines for transaction history visibility. Reference data such as products and account categories are mapped to align product and line item records. Because HubSpot invoices and payment records require associations to contacts and line items, ml-connector builds those associations before writing any commerce data.

How ml-connector handles it

ml-connector stores the Odoo API key and HubSpot private app token encrypted and polls Odoo using write_date high-water marks on the integration user's account. It translates Odoo's resource model (partners become contacts; sales/purchase orders become deals or invoice records) and respects Odoo's record-level access rules: the integration user must have permission to read each record type. On the HubSpot side, ml-connector enforces association rules before upserting invoices or payment records; a contact record must exist before an invoice can reference it, and line items must be created or associated before the parent invoice is written. Odoo record IDs are stored as custom properties on HubSpot objects for idempotency and re-lookup. Because both systems support custom fields, field mapping is configurable per customer. Odoo's JSON-2 API is preferred for new integrations (XML-RPC is scheduled for removal in Odoo 22); ml-connector uses JSON-2 where available and falls back to XML-RPC for older instances.

A real-world example

A mid-market SaaS company uses Odoo for accounting, purchasing, and HR, and HubSpot for sales pipeline and customer success. Before the integration, revenue operations manually exported invoices from Odoo each week, matched them to HubSpot deals by customer name, and logged details into custom deal properties. This manual process introduced matching errors and delays in pipeline visibility. Now, when an invoice is created in Odoo, ml-connector automatically creates a HubSpot invoice record, links it to the contact, associates the line items, and adds the total amount and due date to the deal record. Sales and finance teams see invoice status in HubSpot without switching between systems, and month-end reconciliation starts with deal amounts already matched to Odoo invoices.

What you can do

  • Sync Odoo partners to HubSpot contacts and companies, maintaining a cross-system customer record.
  • Map Odoo sales orders and invoices to HubSpot deals and commerce objects with line item association.
  • Enforce HubSpot association rules so invoices link to valid contacts and include required line items.
  • Poll Odoo on a schedule using write_date high-water marks, respecting the integration user's record-level access rights.
  • Store Odoo record IDs as HubSpot custom properties for idempotent re-sync and change tracking.

Questions

How does the integration handle Odoo's record-level access control?
ml-connector reads and syncs only records that the integration user has permission to access in Odoo. If the user does not have permission to read an invoice or partner, that record is skipped. This prevents data leakage and keeps the integration aligned with your Odoo role and permission structure.
Which Odoo transport should I use for a new integration, XML-RPC or JSON-2?
JSON-2 is preferred for Odoo 19 and later and is simpler to configure with Bearer token auth. XML-RPC is still supported for older Odoo versions and on-premise editions, but XML-RPC is scheduled for removal in Odoo 22. ml-connector auto-detects the Odoo version and uses the best available API.
What happens if an invoice references a HubSpot contact that does not yet exist in the system?
ml-connector creates the contact record first before attempting to write the invoice. If the Odoo partner already has a cross-system ID stored as a custom property, ml-connector looks up the existing HubSpot contact. If not, a new contact is created from the partner data, and the ID is stored for future syncs.

Related integrations

Connect Odoo and HubSpot

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started