Question

How to set file extension (mime type) when uploading attachments from Gmail to Airtable using Zapier?

  • 28 November 2023
  • 7 replies
  • 144 views

I have a Zap that takes emails from Gmail and uploads the attachment to an airtable database.

The files (mainly PDFs) show up just find in Airtable. But when I download them, the extenstion (guess this is the same as mime type) hasn’t been set.

This causes me problems because I want to upload them to a ChatGPT assistant, which I think isn’t able to process the data.

 

I am using the All Attachments field in the Zap. I can see the mime type is there, but can’t see if there’s a way to send that to Airtable. 

 

I’d like to avoid hitting the Airtable API directly.

 

AIRTABLE:

 

DOWNLOAD

 


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

7 replies

Userlevel 7
Badge +14

Hi @cubsphere 

Good question.

You’ll want to use this Zap trigger: Gmail - New Attachment

The desired data points are available to map to Airtable fields.

 

Thanks for the response. 
 

I am already using the gmail attachent trigger. The trigger isn’t the issue. The problem is that the attachments in Airtable are missing a file extension - the “.pdf” is missing. 

Userlevel 7
Badge +14

@cubsphere

You can add to Airtable by mapping the variable to a new field for the File Format.

Can you specify with screenshots where you are expecting to see the file extension in Airtable?

Also we would need context via screenshots about how you are trying to upload those to ChatGPT.

Can you specify with screenshots where you are expecting to see the file extension in Airtable?

 

This is my airtable database. Airtable shows the attachment just fine (the view expands and is visible in the browser).

 

But, when I download it… This is what the attachment looks like on my mac when I download it. It lacks the .pdf extenstion and file type.

 

If I manually change the extension to .pdf, the file opens fine, so it is not currupted, just missing the file type.

 

Userlevel 7
Badge +14

@cubsphere 

How are you downloading the attachment from Airtable?

Are you using the download button when viewing the file in the Attachment field?

I have had no issue when attempting to download a PDF file from an attachment field.

 

Thanks! That’s it. If you click the “download” arrow inside Chrome’s PDF reader the file is missing the .pdf extension, but if I click on “Unnamed attachment” it has the .pdf.

 

I would still like to know how to name the file though. My Zap is setup like this:

 

Userlevel 7
Badge +14

@cubsphere 

To name a file being sent to Airtable you would have to use the Airtable API, which is an advanced approach.