In order to send an attachment file from Google Drive to Airtable:
1. The file needs to be publicly accessible to a user without logging into Google Drive.
In Google Drive, the proper permissions are as follows:
- The type has to be set to “anyone”.
- The role has to be set to “reader”.
2. The URL has to lead to the actual file itself, not a web sharing wrapper page URL.
It seems like you prefer scripting & writing custom programming code, but for other people who are reading this thread in the future, this entire process is extremely easy to accomplish in a no-code way (that doesn’t require any programming code at all) by using Make’s Google Drive modules and Make’s Airtable modules.
In order to send an attachment file from Google Drive to Airtable:
1. The file needs to be publicly accessible to a user without logging into Google Drive.
In Google Drive, the proper permissions are as follows:
- The type has to be set to “anyone”.
- The role has to be set to “reader”.
2. The URL has to lead to the actual file itself, not a web sharing wrapper page URL.
It seems like you prefer scripting & writing custom programming code, but for other people who are reading this thread in the future, this entire process is extremely easy to accomplish in a no-code way (that doesn’t require any programming code at all) by using Make’s Google Drive modules and Make’s Airtable modules.
@ScottWorldThanks for taking the time to reply and share some info. I'm able to open the url in a private browser window and successfully view the image w/o being prompted to sign in to Google, so no issue there.
What's interesting though are the permissions you mention, those are not what is available for me. I believe my permissions are set to 'public' and 'view' with the full description along the lines of "link is public, anyone with the link can view the file" --> ill verify shortly and report back.
I did inspect the page that is successfully displaying the image, looking for a direct image url as i saw mention of a wrapper causing issues, but to no avail. Once the file is loaded to Airtable and I attempt to open it, Im greeted with a loading 'wheel' that doesn't resolve. Opening the same url anyewhere else dose not redirect and promptly displays the image.
I feel sending an image from Drive isnt anything special and a rather common use-case, I cant believe I'm having such a hard time with it.
Im thinking im missing something basic as I cant find much on others experiencing the same issue. Ive been using Airtable for 8 years and have never felt so lost on something seemingly so basic.
What is the URL of the image?
you were indeed correct earlier in your observation that outside of gApps Scripts no 3rd party implementations are in my stack; it must remain this way.
Oh, did I also forget to mention that if you're able to help me resolve this, I'll graciously be buying the beers, no good deed goes unrewarded here : )
That is not the correct link to the image. That is a "Google Drive share link" that takes you to a shareable web page that is a Google Drive wrapper page around the image.
You can tell because you're not just seeing the image in your web browser, but you're seeing a login button and a whole bunch of other things on the screen besides the image itself.
So you're not pointing to an image, you're pointing to a web page.
You will need to get the "web content link", which takes you to the image itself.
The "web content link" would look something like this — notice how this just takes you to the actual image itself, with nothing else added to the web page:
https://drive.google.com/uc?id=1ksFJZgtRdRIg2mtifXEqJ8ILtVafezwx
I'm sure that you have a valid reason for writing custom programming code to do all of this, but in the world of no-code databases like Airtable, it seems like you're making this much harder on yourself than necessary. For example, if you were using Make to do this, it would take you a few seconds to setup, and you could just point & click on the link that you wanted to use: either the "web content link" or the "Google Drive share link".
Oh, I just saw your post that you do not want to use any 3rd-party apps. For your own enjoyment, you may want to check out Make to see how easy they have made connecting & communicating & integrating with APIs. Also, check out this thread that I created which helps people get acquainted with Make.