Oct 23, 2020 12:56 AM
Hi everyone,
I just wanted to share a quick tip I use.
I often see people use Zapier or miniExtensions to do this basic operation so it may be easier to do this way.
I am using the Automation feature of Airtable to trigger when the record has a “pending URL” (that should be processed).
When triggered, Airtable let’s you set the Attachment field type with an “URL” value and will automatically convert it. (tested for images and PDFs)
Florian
Jul 19, 2021 08:21 AM
Hello @Bastien_Vairet,
As explained in my email (just for history purposes and may help others in the future), you chose the wrong trigger.
When doing this, please make sure you use a trigger that is appropriate. The easiest one is “Record is updated” → on a specific field “URL” (url of the file to upload).
You may also chose to trigger on “view entry” (record enters a view) but you have to make sure the view is configured properly.
Florian
Jul 28, 2021 12:43 PM
Hi Florian. Does this still work?
I’ve used the update record trigger and action steps, and shared the Google Drive file and image. I’m using .png image files. This is the Trigger field with corresponding URLs and Attachment field output:
For some reason the images show up as files. My goal is to pull these images directly from this field into a web app interface that directly integrates with Airtable, so the file type, quality, and size are important.
Jul 29, 2021 07:51 AM
Hello @Benjamin_Watrous,
Yes it’s still working on my side.
Could you please share an example URL you are using ?
Please note there are (at least) two types of Google Drive URLs :
(Please check the following page for more information about all URL variations available on Google Apps)
You can only use the second one because the first one will be downloaded by Airtable as “text” (download the previewer page and not the file itself)
Florian
Jul 29, 2021 09:16 AM
Jul 29, 2021 09:19 AM
That last post was me just pasting the link.
Jul 29, 2021 09:28 AM
As explained above, you link is a “preview link”.
Please take the time to read my answer and visit the link I gave you.
Jul 29, 2021 12:29 PM
Took “the time” (all afternoon) to read your answer, the link you provided, and changed the links, however this is my output still:
These URLs, from the article, work in a browser, but not in my update record automation.
Jul 30, 2021 01:24 AM
Hello @Benjamin_Watrous,
Please note the presence of a “?” between the /uc and export in the URL
Your generated link is missing that “?” symbol.
https://drive.google.com/uc?export=download&id=DRIVE_FILE_ID
What I usually do when working with Google Files (Docs, Sheet or “files” in Drive) is just store the “ID” of the document in Airtable. (column named “GDrive File ID”).
Then I create a formula column that calculates the final URL to “view” or to “download”.
That formula for a download would look like :
"https://drive.google.com/uc?export=download&id=" & {GDrive File ID}
Using that “calculated” URL would be perfectly fine to use in an automation
Let me know if it worked for you :thumbs_up:
Florian
Jul 30, 2021 11:17 AM
Thanks for the organization tip!
Yes. I noticed the missing question mark and had already replaced it, with no luck. Airtable support provided working URL though. It’s slightly different than yours in that it leaves out “download&id” part:
https://drive.google.com/uc?id=FILE_ID_HERE
Appreciate the replies. Your info was the closest I came until Airtable support helped out.
Kind regards,
Ben
Jul 30, 2021 11:25 AM
Sorry. Correction. Working URL replaces “export=download&id=” with “id=FILE_ID_HERE”.