Aug 27, 2024 09:41 AM
Hey everybody, I'm building a script using Airtable Scripting and I'm looking to reference/extract/use the contents of files in a file attachment field I have. If it matters, these files are mostly PDFs, and my field may contain more than one. I want to take the contents of the file, or in cases of multiple each file, and include that in the payload of a REST API call. Right now, I am totally unable to get to the contents of the file itself in Airtable Scripting.
Has somebody done this before? Could you please help out?
Best,
Cam
Aug 27, 2024 11:36 PM - edited Aug 27, 2024 11:36 PM
I don’t know how to do that with scripting, but you can do that in a no-code way that doesn’t require writing any JavaScript code by using Make’s REST API automations & integrations.
If you want to download files from an Airtable attachment field, then you’ll need to iterate through the attachment field and then use the HTTP “Get A File” module to download the files.
If you’ve never used Make before, I’ve assembled a bunch of Make training resources in this thread. For example, here is one way that you could instantly trigger a Make automation from Airtable.
I also give live demonstrations of how to use Make in many of my Airtable podcast appearances here.
For example, in this video, I showhow to work with Airtable attachment field arrays , which might help you understand some of the nuances of how to work with attachment fields.
— ScottWorld, Expert Airtable Consultant
Aug 28, 2024 09:47 AM
Thank you very much, Scott! I'll try this out