Dec 17, 2020 05:13 AM
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:
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!
Solved! Go to Solution.
Dec 17, 2020 07:47 AM
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!
Dec 17, 2020 06:09 AM
Welcome to the community, @Thimo! :grinning_face_with_big_eyes: A couple questions…
Dec 17, 2020 06:23 AM
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.
Dec 17, 2020 06:49 AM
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.
Dec 17, 2020 07:47 AM
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!
Dec 17, 2020 08:16 AM
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.