What “integrating email” usually means
Behind the request “I want email integrated with the ERP or the CRM” there is usually one of three different needs. It pays to separate them from the start, because each one needs a different tool and a very different amount of work.
- See the conversation where the work happens. A salesperson opens the customer record and wants to find the emails exchanged with that customer. This is a logging problem: keep a copy of the message next to the contact, company or deal.
- Let each email open a record. An address such as support@ or sales@ receives messages that must become a case, a lead or a ticket without anyone copying them by hand. One email, one record.
- Get the content of the email into the ERP as data. A customer sends an order in the message body or in a PDF, and someone types the references, quantities and dates again. Storing the message is no longer enough: it must be read, understood and validated before a document is created.
The first two needs are usually covered by features the CRM or ERP already has. The third one needs an API integration and, almost always, an AI model that reads free text and attachments.
What each system offers without development
This summary covers what each vendor documents. We checked it on 8 November 2026 against the official documentation, linked in the sources at the end of the page. When we say we did not find something, it means it does not appear in that documentation on that date.
- HubSpot. It logs emails sent from outside HubSpot through a BCC or forwarding address. A team email connected to the conversations inbox creates the contact when the sender is unknown, but accounts created after 1 April 2024 can no longer create tickets from the channels of that inbox. Through the API, version 2026-09 creates the email with
POST /crm/objects/2026-09/emailsand associates it with the record; the old v3 now sits in the legacy documentation. - Salesforce. With Email-to-Case, support emails arrive as cases and are answered from the case itself. Through the API, the EmailMessage object supports
create()and is available in orgs that use Email-to-Case or Enhanced Email. - Zoho CRM. It offers BCC Dropbox, a unique address per user for logging emails, and inbox integration over IMAP or POP3. From the Enterprise edition up, Email Parser creates leads, contacts, accounts or custom-module records from incoming emails. Through the API (version 8), records are inserted with
POST /crm/v8/{module}, up to 100 per call. - Microsoft Dynamics 365. Server-side synchronization connects the app directly to the email server. Automatic record creation and update rules create leads, opportunities or cases from incoming emails, and for email they require a queue. Through the API, Dataverse exposes email activities at
/api/data/v9.2/emails. - SAP Business One. The Service Layer, its OData API, creates and reads sales documents such as orders (
/b1s/v2/Orders) and quotations (/b1s/v2/Quotations). The Outlook integration add-on, which saved emails as activities, appears in SAP’s documentation for version 9.0; we found no equivalent documentation for 10.0. - Holded. The Scanner has an inbox with its own email address: incoming attachments are scanned, grouped as purchase or sales documents, and a person registers them with “Create document”. Through the API, documents are created with
POST /documents/{docType}. - Odoo. Every record has a chatter for sending emails and logging notes, and an email alias turns incoming messages into CRM leads. Odoo 19 adds the JSON-2 API (
/json/2/<model>/<method>) and schedules the removal of the XML-RPC and JSON-RPC APIs for Odoo 22 (fall 2028) and Odoo Online 21.1 (winter 2027).
Microsoft 365 and Google Workspace are not on the list because they are not the destination but the source: the mailbox the emails are read from. The steps below cover them.
When native features are enough and when you need the API
- Native logging is enough if the goal is to see the customer conversation inside the CRM and nobody has to retype data from the email.
- An alias or an inbox address is enough if each email creates a single record of one type, the fields come from the sender, subject and body, and attachments only need to be stored.
- You need the API if the email carries lines, quantities, references or dates; if the data comes in an attached PDF or spreadsheet; if it must be checked against ERP customers and items; or if a person must approve before the document is created.
AI only comes in with the third approach, and only to read: it decides what kind of email it is and turns free text into fields. Prices, discounts, taxes and terms always come from the ERP, never from the model.
Before you start: username and password no longer work
Many older integrations read the mailbox over IMAP with a username and a password. Both major providers have closed that door:
- Microsoft has turned off Basic authentication in all Exchange Online tenants for IMAP, POP, EWS and the other client protocols. The general retirement date was 1 October 2022.
- Google turned off access for less secure apps in all accounts on 14 March 2025. Since then, IMAP, POP and SMTP no longer work with a regular password, except with app passwords.
The right path is OAuth: in Microsoft 365, an app registered in Microsoft Entra ID; in Google Workspace, an OAuth client or a service account.
Steps of an API integration
This is the sequence we follow when an email has to end up as an ERP document. The limits and time frames quoted are the ones Microsoft and Google publish as of the review date.
- 1. Narrow the scope. Which mailbox (a shared one, such as orders@, is better than a person’s), which kinds of email, which fields, which document is created and who approves it. A small, well-defined scope goes live sooner and is easier to measure.
- 2. Ask for minimum access. In Microsoft 365, the app gets the Mail.Read permission and is limited to the in-scope mailboxes with RBAC for Applications in Exchange Online, which replaces the old application access policies. In Google Workspace, domain-wide delegation gives access to the data of all users for the authorized scopes, so authorize only the scopes you need. Also, gmail.readonly is a restricted scope: if the app is public, Google requires verification and, if it stores that data on servers, a security assessment.
- 3. Learn about every new email. In Microsoft Graph, a subscription to the messages of a mailbox lasts at most 10,080 minutes (just under 7 days), or 1,440 minutes if the notification includes the message data, so it must be renewed before it expires. If your service does not respond, Graph retries delivery for up to 4 hours, and to recover anything missed, delta query works one folder at a time. In Gmail,
users.watchsends notifications to a Cloud Pub/Sub topic and must be called again at least every 7 days; thenhistory.listreturns the changes since the last historyId. That history is usually available for at least a week; if the starting point is too old, the API returns a 404 error and a full sync is needed. - 4. Never process the same email twice. Store one identifier per message: internetMessageId in Graph, which is the RFC 2822 Message-ID, or Gmail’s immutable id. Before creating anything, check whether that identifier has already been processed. A retried notification or a forwarded email must not create a second order.
- 5. Classify and extract with a fixed schema. The model decides what kind of email it is and returns only the expected fields. Anything it cannot determine is recorded as a doubt, and the draft waits for review. This is a minimal schema for orders:
{ "type": "order | quote_request | invoice | other", "sender": { "email": "text", "tax_id": "text or null" }, "customer_reference": "text or null", "lines": [ { "sku": "text or null", "description": "text", "quantity": "number", "unit": "text or null" } ], "delivery_date": "YYYY-MM-DD or null", "attachments_read": ["file name"], "doubts": ["what could not be determined, and why"] } - 6. Validate against the ERP. The customer is matched by tax ID or by the sender’s domain; each line by item code. Prices, discounts and taxes come from the ERP. If something does not match, the draft stops and the doubt goes to a person.
- 7. Create a draft and let a person approve it. The document (order, quotation or record) is created as a draft with an idempotency key and a link to the original email. The approver sees the email, the attachment and the extracted data on the same screen.
- 8. Respect the limits and monitor. Microsoft Graph allows 10,000 requests every 10 minutes per app and mailbox, with at most four at the same time. Log every step (received, classified, extracted, validated, written and approved) and compare the mailbox with the processed list every day.
Common mistakes
- Treating every email as an order. Without a classification step, notifications, newsletters and auto-replies fill the ERP with empty drafts.
- Letting the model set prices or taxes. The model reads; amounts come from the ERP’s price lists and rules.
- Using an employee’s personal mailbox. Access breaks when that person changes role or leaves. A shared mailbox survives team changes.
- Forgetting renewals. An expired Graph subscription or Gmail watch stops notifying without any visible error. Renewal must be scheduled and monitored.
- Ignoring threads. A “RE:” that changes a quantity must update the existing draft, not create another one.

