Best answer

Images in Google Docs aren't coming in correctly when email text and images are inserted.

  • 11 November 2022
  • 3 replies
  • 193 views

Hello,

 

I’m trying to automate a system to insert email text and images into a Google Doc with Zapier. I can get it to import the text, but the images aren’t coming in correctly, it seems like I might need something to parse the email first, then insert it.

 

If images are linked externally in the email (ie newsletters, email signatures) it works fine, but if it’s just an image that has been dragged into the email it doesn’t work.

 

Any ideas I could try would be most appreciated

 

thanks

icon

Best answer by RALaBarge 15 November 2022, 16:22

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 4
Badge +7

I can see the img src doesn’t look right which might be causing the problem? 

body_html

<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><img src="cid:ii_lag2bsoe0" alt="Screen Shot 2022-10-27 at 3.05.22 pm.png" width="550" height="562"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>

<b><font color="#0f1b27" face="Verdana" size="2"></font></b>

<div><font color="#0f1b27" face="Verdana" size="2"></font></div>

 

<div><br>

<span style="color:#0f1b27;font-family:&#39;verdana&#39;;font-size:x-small"></span></div>

 

<div style="font-family:&#39;verdana&#39;"> </div>

 

<div>

<p style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>

</div>

 

<div>

<p><font face="Verdana" size="1">Confidential Email</font></p>

 

 

</div>

</div></div></div>


Hey @Joshmce, yup I think you are correct.  The first string in the first double quotes in that HTML block are a direct URL to the image you wish to include.  If it does not point to a URL, the email client on the other side does not know how to find it to display for the user.

If this image comes up for you in the email you are sending, I am going to guess that that ‘cid’ string is the way Gmail looks up items in Google Drive and that is where it is being generated since they are being drug into the email instead of sending the URL itself.

Would you be able to send the URL version of these images in the email?  Zapier would not be able to look up that ‘cid’ to find the image at all just like the email client -- you could either change the way the data is being sent to Zapier by imbedding those images as URLs or perhaps should the ‘alt’ field always be a reference to the file name use a Google Drive Find File step to fetch it directly!

Hopefully that makes sense, let us know if you had more questions =)

Userlevel 7
Badge +12

Hi @Joshmce!

I’m not sure that it would be possible to extract the images from an email if they’ve been dragged into the email. Could I ask you to share an example of the email body (the html version) as you see it in the Zapier editor? That way we can see if there are any links/files that we might be able to work with. Don’t forget to remove or obscure any personal or private information in any screenshot you share in the community (eg full name, email address, etc).

 

Thanks!

Hi Danvers,

thanks for your response. See below the html code, I can see the img src doesn’t look right which might be causing the problem? 

thanks

 

body_html

<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><img src="cid:ii_lag2bsoe0" alt="Screen Shot 2022-10-27 at 3.05.22 pm.png" width="550" height="562"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>

<b><font color="#0f1b27" face="Verdana" size="2"></font></b>

<div><font color="#0f1b27" face="Verdana" size="2"></font></div>

 

<div><br>

<span style="color:#0f1b27;font-family:&#39;verdana&#39;;font-size:x-small"></span></div>

 

<div style="font-family:&#39;verdana&#39;"> </div>

 

<div>

<p style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"> </p>

</div>

 

<div>

<p><font face="Verdana" size="1">Confidential Email</font></p>

 

 

</div>

</div></div></div>