I am trying to upload data to an Airtable attachment column but it doesn’t work when the source Google Drive folder/file (Web Content Link) is private. I first have to make the folder/file public and then it will upload to Airtable.
Is there no way around this ? I can’t make my files public, and I can surely not use toggle the public/private every time I’m uploading files to Airtable.
What I am trying :
I can use the Google Drive API to download the file with the query parameter alt=media and this should give the file contents in the response body. Along with this I can store the file name, URL, etc. All of that into a storage.
Now I need a way to reconstruct this, create a file (even if temporary) and then use that link to upload my attachment on Airtable.
I tried with the normal search file/watch file, modules as well as to use the download a file module. In both cases, using the Web Content Link, Airtable did not populate the Attachment. It only worked when the source came from a public accessible source.
This
Airtable will retrieve the file from the public url and make its own copy to store as an attachment
That requirement does not make sense at all. What if I need to upload a patient’s medical document? I need to expose it to the internet and then add it to Airtable. Would have been quite simple to provide direct file upload capability in Airtable itself.
What I did was I just created a private folder and moved the files into that folder once I have uploaded them to Airtable.