Embedding images in email from Gmail automation

Hello!

I have the following workflow and am having trouble embedding images in the automated gmail that is being sent.

This is the html code that is in the body of my email which is a youtube link which should have the thumbnail embedded.

The issue is that the image is broken and isn’t being embedded correctly.

However, the email being sent includes the thumbnail in the attachment (the image that I want in my body) which makes it seem like the img source attachment is not the issue. Any ideas what’s going on?

How are you attaching the images?

If you need further assistance, please provide the following:

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Input/Output bundles

Please provide the input and output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

3 Likes

Hi @Bryan_K,

The image itself may be embedded in the header and the ci: string is a reference to it.
I believe you may need to get the ci: string, then get the image buffer data (which would be base64 encoded) from the header, base64 decode it, and you’re left with the image buffer data for use in another module… If I get time later I’ll try to test this out.

3 Likes

That cid: (Content-ID) is a reference to the attachments

So are you saying you’re trying to build an email in Make, and that email should include both a link to a YouTube video and its corresponding thumbnail?

3 Likes

Thank you both for the replies (@samliew & @Donald_Mitchell)!

Donald - to your point i’ve tried attaching the image and then using the cid to refer to that attachment (which didn’t work). Cid is pretty outdated so perhaps the email client doesn’t allow the rendering 100% of the time.

Next I tried inline base64 encoding the image and for some reason that didn’t work either (still don’t know what was the issue).

In the end, I pulled the img src directly from youtube (img src = "https://img.youtube.com/vi/youtubevideoidhere/hqdefault.jpg). And that seemed to do the trick.

I apologize for all my frequent posting but I appreciate your guys promptness and hopefully I am providing value back to this community by following up with the solution :slight_smile:

3 Likes

Hey there @Bryan_K :blob_wave:

Just wanted to jump in and give you a round of applause for this clever solution you came up with thanks to the helpf from @samliew and @Donald_Mitchell! :clap:

We deeply appreciate that you came back to us with the final solution. This approach keeps our community organized and healthy for others as well as for us.

Keep up the awesome work! :meow_party:

2 Likes