Send HTML-formatted e-mails in Odoo 18
In OdooOdoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management... 18, email templates can be formatted with HTML to send professionally designed emails. This is particularly useful if automatic notifications or structured emails, such as support tickets, are to be sent.
Application example: VIP customers & SLA notification
In our support process, we realized that it is important to quickly notify the team about VIP customers or tickets with a certain SLA level. The original idea was to use a webhookA webhook is a method for automated communication between two applications in real time. It enables an application to send data or events to another application as soon as a certain action is performed. Instead of an application regularly requesting data (polling), the webhook automatically sends a message or an HTTP request to a predefined URL as soon as an... to post a message directly to Microsoft Teams
Odoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management... 18 are not compatible with Microsoft Teams
The solution: Send an email to a Teams
- The e-mail must be sent to the Microsoft Teams
- The sender must be at least a member of the team for the message to be put through.
- However, this was not a problem thanks to the integration of Exchange
Odoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management...: the Odoo
Odoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management... support user who sends the emails was integrated into the Microsoft team.

Step 1: Create e-mail template in Odoo 18
In OdooOdoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management..., go to Settings > Technical settings > Email templates and create a new template. Select the appropriate model, e.g. customer service ticket.

Step 2: Insert HTML code for the e-mail
The HTML code is inserted directly into the email template in the language selection (DE/EN for us). This allows you to design different content for different languages.
Here is an example of a ticket notification:
<p>🚀 <b>Neues VIP-Ticket erstellt!</b></p>
<p><b>Betreff:</b> <t t-esc="object.name"/></p>
<p><b>Kunde:</b> <t t-esc="object.partner_id.name if object.partner_id else 'Unbekannt'"/></p>
<p><b>Priorität:</b> <t t-esc="object.priority"/></p>
<p><b>Zuständig:</b> <t t-esc="object.user_id.name if object.user_id else 'Nicht zugewiesen'"/></p>
<hr>
<t t-if="object.body">
<p><t t-raw="object.body"/></p>
</t>
<p>
<a t-att-href="'https://deine-ODOO-URL/web#id=' + str(object.id) + '&model=helpdesk.ticket'">đź”— Kundendienstticket ansehen</a>
</p>
Step 3: Test the e-mail preview
Save the template and use the preview function to check whether the data is displayed correctly.

How do the variables in the email template work?
In OdooOdoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management... templates, variables are integrated with
t-esc
or t-raw
:
t-esc
: Ensures that the value is output securely (no HTML injection possible).t-raw
Is used if HTML content is to be rendered directly (e.g. forobject.body
).
You can find the official documentation for OdooOdoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management... 18 here: Odoo 18 e-mail templates.
Conclusion
With HTML-formatted email templates in OdooOdoo is a modular open source ERP system that supports companies of all sizes with digitalization. It combines numerous business applications such as CRM, accounting, warehouse, project management, HR, helpdesk and webshop in one platform. What exactly is Odoo? Odoo is a flexible business software that can be used to digitally map all important company processes - from customer management... 18, you can send professionally designed messages and easily notify Microsoft Teams
A webhook is a method for automated communication between two applications in real time. It enables an application to send data or events to another application as soon as a certain action is performed. Instead of an application regularly requesting data (polling), the webhook automatically sends a message or an HTTP request to a predefined URL as soon as an.... If you need support with the setup, please contact us at Olbricht IT!
Dieser Beitrag ist auch verfĂĽgbar auf:
Deutsch (German)
Leave A Comment?