Reusable HTML / MJML components in email templates
HI there, I have a usecase where I have a lot of transactional emails to setup which share some common non trivial components (Product card, User card, Table etc). I guess I don't have much other choice than writing these specific components in HTML, but what would be the best way to centralise the code of these components? Is there any better approach than duplicating the code in each template where I need it... ? Thanks for insights and help π
4 Replies
Hi @GP
Which email provider you are using to send email?
@Pawan Jain We're using Sendgrid. Also using the cloud version of Novu FYI
Thanks @GP for sharing.
Currently, user has to write HTML content in our email editor for each workflow.
We do have layouts that can be used for more branding and outer layout purpose.
For sendgrid, we have added support to send sendgrid pre made html template using overrides
checkout this documentation:-
https://docs.novu.co/channels-and-providers/email/sendgrid#using-sendgrid-template
Got it, thanks for the tips π