Help

Re: Creating records via Python - attachment URLs

2026 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Stephen_Pugh1
4 - Data Explorer
4 - Data Explorer

Good morning, Airtable Community! I am getting into some Python automation scripts and working with Airtable for the first time (translation: relative n00b all around).

I am looking to programmatically create a couple hundred records at a time, and each record has a thumbnail JPEG image that I want to include as a Screenshot attachment. I understand that Airtable requires a URL to the JPEG rather than a path to the local file, but so far all of the cloud storage options that I have at my disposal (well, both - Google Drive and Dropbox) construct a unique URL with a long string of arbitrary characters that I don’t yet have access to in my script.

My question - how do you smarter folks accomplish this, is there a scriptable step that I am missing? OR, is there a service or trick that I can use to make a consistent, identifiable URL (i.e. http://somestorage.com/SameNameAsTheLocalFile.jpg")?

Thanks for any further insight that any of you can provide!
Steve

3 Replies 3

Yes. It is the step that accesses the cloud file store and provides the URL-based [public] location of the file.

Doing this in Python with Google Drive requires you use the Google Drive API. If, alternatively, you were automating this process with Google Apps Script, the native SDK would give you very easy access to Drive.

Thanks, Bill, I’ll turn my sights on the Google Drive python API and see what happens.

Best,
Steve

You could also look at Cloudinary. It has a predictable method of creating urls for the images that it serves.