Help

Re: Sending Image Attachment Using Gmail Automation Action Doesn't Work

Solved
Jump to Solution
2911 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Thimo
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello everyone,

I am really enjoying Airtable, but I am running into an issue using the send Gmail email action with an image attachment inside an automation. When this email with image attachment is send, the image doesn’t show up as attachment, but a weird file-type does:

2020-12-17 om 14.10.59 2020-12-17 om 14.10.40

These images in my base are just simple jpegs from around 350kb. When using the ‘Airtable send email’ action the attachments work fine, but I need to use gmail.

Any help is super appreciated!

1 Solution

Accepted Solutions
Thimo
5 - Automation Enthusiast
5 - Automation Enthusiast

I think I somehow fixed it. In my Node script I was uploading the images directly from a source on the web to Airtable. Now, I first upload them to my AWS S3 bucket and use the S3 URL to upload them to Airtable. I don’t know why but it now works perfectly!

Thanks for your replies either way, I really appreciate it!

See Solution in Thread

5 Replies 5

Welcome to the community, @Thimo! :grinning_face_with_big_eyes: A couple questions…

  • You say the images are “simple jpegs”, but a JPEG image should appear with a thumbnail that is a smaller version of the full image. The screenshot you show has a generic thumbnail image, which indicates that the file type can’t be discerned to create a thumbnail. There’s also no .jpg file extension, which may be part of the problem.
  • When are the attachments added to the record in relation to when the automation is triggered? Does the addition of the attachment trigger the automation? If so, that could also be a problem. It takes a few seconds for new attachments to process correctly, so the file might not be completely uploaded to Airtable’s storage when the automation triggers to send the message. Then again, this wouldn’t fully explain why it works with Airtable’s own email action vs Gmail, but I thought I’d mention it anyway.

Hi @Justin_Barrett, thank you for your reply!

The images are added immediately when the record is created. These records are created using the Airtable.js library. The images show up fine in the records and when downloaded from the record (using the right mouse click menu in chrome) they download as file.jpg. It’s weird that the file in the gmail attachment doesn’t have a file extension.

It is striking that when using the ''Airtable send email" action the attachments show up correctly. These emails do take more time to be received so maybe there is uploading going on behind the scenes.

Do you might know what can cause this behaviour? I am happy to send you some of the image files in a PM if that helps with understanding the situation.

The file extension is a red flag as is the bland icon.

I believe the only requirement for Gmail to attach an image to a message is to embed the URL to that image in the message. I believe the attachment is automatic if such URL exists in the body of the message, so you might want to try that.

I believe the attachment is automatic if such URL exists in the body of the message…

UPDATE - this is not true; images are only attached automatically when – and only when – the image is a URL in Google Drive.

Thimo
5 - Automation Enthusiast
5 - Automation Enthusiast

I think I somehow fixed it. In my Node script I was uploading the images directly from a source on the web to Airtable. Now, I first upload them to my AWS S3 bucket and use the S3 URL to upload them to Airtable. I don’t know why but it now works perfectly!

Thanks for your replies either way, I really appreciate it!

Good to hear. It’s possible you were facing a timing issue as S3 is far quicker about instantiating documents that the attachment process in Airtable. I have a hunch the Airtable image instances in its CDN were simply not ready for consumption when your API app called for them.