SENDGRID only allows a certain amount of characters in a variable

Hi everyone!
Update since problem solved on my side :white_check_mark:

The problem:
I was trying to send an image through one of the variables but was using :encoded_in_base_64 in the variable instead of a plain URL. And so the image was sent to SendGrid as a long chain of characters, which then exceeded the 10000 bytes.

The solution:
@copilot has been really helpful and reactive in dealing with this issue so thanks and :+1: thumbs up :+1: to the team :grinning:

“When sending images, you should likely have a tag in your HTML email template and have it’s “src” tag be a variable like %VAR1%. You could pass the link to an image to that variable so that its injected into the template properly and you don’t Base64-encode anything.”

So the trick is to normally input the file URL in the given variable in Bubble and to add a HTML code block in your SendGrid template that will call this variable.

  • You could simply put <img src="%VAR1%"> in your HTML block
  • alt="(image bloquée)" is for alternative text (when the image isn’t displayed properly)
  • align="middle" is probably useless (if you only have your variable in that HTML)
  • <center></center> is to have the image centered in you template. You could also use “right” / “left” / “top” / “bottom”

There’s also a conversation here on the forum.