URL to Attachment

Hi! I have sooo enjoyed this script for images. But I have a PDF automatic download link like this: https://www.teacherspayteachers.com/Preview/Noun-Sort-Cut-and-Paste-083291900-1381063936?fn=valentinesdayworksheetspreview.pdf

That is NOT pulling the PDF correctly. Any ideas?

One idea - that URL is not publicly accessible, a requirement of Airtable attachments.

Ah, makes sense. Ok, thanks!

How about this? I know it is in a viewer…https://www.teacherspayteachers.com/pdfjs/view.html?file=https%3A%2F%2Fpreview-2.teacherspayteachers.com%2F0%2F944%2F944153%2F6d9dcd81962c9b98d6d16b223d687828%3Fpreview-token%3Dexp%3D1596657536~hmac%3D7376d51a55862c7f9837c6e18591f1b34907f90be611c2387ba77cb1ee6c25f9%26file_name%3Dwinterworksheetspreview.pdf

Viewers do note make it possible for a GET request to access the file. Viewers are for humans; Airtable’s attachment system is a machine.

Ha, yeah, I know. I want the impossible :slight_smile:

The viewer you shared is an HTML proxy for viewing what appears to be a PDF document. Someone needs to tell you how to look at the PDF without going through that proxy. Then, and only then, will Airtable be able to ingest the documents.

1 Like

So, i’ve been following along on this, trying to apply it to my own table.

Could you possibly post the entire script, start to finish, that you were able to execute fully? Then I might be able to more clearly see where my error is…!

Hi - This script works great for one URL to attachment , but is it possible to make it work with several URLs? I have 7 columns of URL images (some records do not have all 7 filled), and tried to get it to do more than one column but have been unsuccessful. (My scripting levels are not great but I usually can get there in the end after a lot of trial and error, but I’ve come to a standstill on this attempt. )