Odoo SendGrid integration

SendGrid Connector

Contacts, CRM leads and applicants go to SendGrid lists, and every unsubscribe and bounce comes back.

SendGridMarketing ContactsListsField mappingSuppressionsSigned Event WebhookSMTP

What it does

Connect your Twilio SendGrid account with an API key, global or EU. Then write audiences: which Odoo records (contacts, mailing contacts, CRM leads, recruitment applicants), which filter, which SendGrid lists, and which Odoo field fills which SendGrid field. New and changed records are sent on each sync, and a Send to SendGrid entry appears in the Actions menu of that model. Unsubscribes, unsubscribe groups, bounces and spam reports come back to the Odoo blacklist, and the signed Event Webhook records deliveries, opens, clicks and bounces. If you also send Odoo mail through SendGrid SMTP, each event lands on the Odoo message it belongs to.

Who it is for

  • Sales teams that want open opportunities in a SendGrid list. An audience picks CRM leads with a filter, maps contact_name to first_name and last_name, and sends them to one or more Marketing Contacts lists. Only new and changed records go out, up to 1,000 per upsert call.
  • Recruiters keeping applicants up to date. With Recruitment installed, applicants can be their own audience. Their email_from is used as the SendGrid e-mail, and a note in the chatter shows when an applicant was sent or removed.
  • Companies that send Odoo mail through SendGrid SMTP. One button creates an smtp.sendgrid.net outgoing mail server. With Tag outgoing Odoo mail on, each message carries its Odoo ID in the X-SMTPAPI unique arguments, so bounces mark that chatter notification and opens and clicks reach Email Marketing statistics.
  • Anyone who has to honour unsubscribes in both systems. Global unsubscribes, bounces and spam reports from SendGrid go on the Odoo blacklist. Odoo's blacklist goes to SendGrid global suppressions, and each unsubscribe group can opt people out of the Odoo mailing lists you choose.

Features

Audiencescontacts, mailing contacts, CRM leads or applicants, any filter, one or more SendGrid lists
Field mappingany Odoo field, the first or last part of a name, or fixed text such as "lead" to tell sources apart in SendGrid segments
Only changesrecords sent once are sent again only when they change, in batches of 1000
Actions menuselect records in a list and send them now, as a SendGrid user
Leaving the filterremove the contact from the lists, delete it in SendGrid, or leave it
Chatter notethe record shows when it was sent to SendGrid and when it was removed
Suppressions backglobal unsubscribes, bounces and spam reports blacklisted in Odoo; each unsubscribe group opts out of the Odoo lists you pick
Blacklist outaddresses blacklisted in Odoo go to SendGrid global suppressions
Signed Event Webhookevery call verified with your ECDSA verification key; each event stored once
Mail through SendGridone button adds an smtp.sendgrid.net mail server; Odoo mail is tagged so bounces mark the chatter notification and opens and clicks reach Email Marketing statistics

Setting it up

  1. In SendGrid open Settings > API Keys and create a key with Marketing and Suppressions access.
  2. In Odoo go to Email Marketing > SendGrid > Accounts, create an account, paste the API key and pick the Global or EU region.
  3. Press Test connection, then Load lists, fields and groups. Create custom fields in SendGrid first, because Odoo only reads them.
  4. Set Run as to the user whose rights the hourly sync uses, and tick Sync every hour.
  5. Under Email Marketing > SendGrid > Audiences pick the Odoo records, the Only records matching filter, the SendGrid lists and what happens When a record no longer matches. Then fill the field mapping.
  6. On the Event Webhook tab copy the Post URL into SendGrid's Event Webhook, switch on Signature Verification and paste the Verification Key back into Odoo.
  7. Press Sync now and check Sent Records, Events and Log.

SendGrid Connector: questions

Which Odoo editions does it support?

Odoo 19 Community and Enterprise. It needs the Email Marketing app. CRM and Recruitment are optional, and leads or applicants show up as audience choices only when those apps are installed.

Does it work with an EU SendGrid subuser?

Yes. Set the region to EU and calls go to api.eu.sendgrid.com instead of api.sendgrid.com.

What happens to a contact that leaves the filter?

You choose per audience: remove it from the lists (the default), delete the contact in SendGrid, or leave it there.

Can I send records by hand instead of waiting for the hourly sync?

Yes. Saving an audience adds a Send to SendGrid entry to the Actions menu of that model, so you can select records in a list view and send them straight away.

What if a webhook call is not signed?

It is refused with HTTP 403 and nothing is read from it. Signed events are stored once each, even when SendGrid retries them.

Is there a test or sandbox mode?

No. The module calls the live SendGrid v3 API with your key, so try it on a test list first.