Send large HTML as payload in the trigger event

Hello, I have a Rails backend which sends emails through Mailgun. My workflow right now is the following:
  • Define a template as a HTML file with tags.
  • Render the template as a HTML string and substitute the tags.
  • Send the HTML string to the Mailgun API, because their API has support for a HTML property which receives HTML strings
I saw that Novu supports using triple braces to send dynamic HTML content as the payload, and I sent my HTML string to Novu but got an unexpected provider error with the message:

{ "body": "{\"errors\":[\"Option Metadata must not exceed 3500 bytes.\",\"Data Data must be no more than 2048 bytes long\"]}", "statusCode": 400 }

So, is there a workaround to send large HTML content? I would like to keep my templates configured and rendered in my Rails backend instead of creating layouts on Novu.
Was this page helpful?