Rendering Images in Retool

The use case which I am trying to do is attach a logo when sending out the email.

What I am doing right now is converting the image into base64 and storing the string in the database. After that I am using the javascript to format the template and replace the image link from the database and send the email from retool. The email is being sent fine but it is not including the logo. I did some research on this and got to know that gmail blocks the base64 strings when sending from retool. So, I am reaching out to see what options I have to send the organization logo in an email template from retool. We have an option of uploading images in cloud but this is not an option for us as there are limitations.

Any help would be helpful.

hi @suchi_redde,
Yes, Gmail blocks base64 images for security reasons. I don't believe there is a way to do this with gmail right now without having the image hosted somewhere and using a url.

You could POSSIBLY try using a content ID (cid) in your image tag, using a third party email resource like sendGrid for example (because Retool does not provide a way to add metadata to your attachments). You would add an attachment in your api post with "content_id" set, and then reference that in the src of your image tag: . I'm not sure if that will work with gmail and I am currently trying to set up sendGrid to test it but I have run into problems with sendGrid blocking my email accounts. (You may have better luck testing this...?)