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
Oct 23, 2020 01:21 AM
Thanks for the excellent reminder on this! A great way to quickly add attachments to a base! :slightly_smiling_face:
Although I think that I just stumbled upon an Airtable bug when sharing a base that has automations in it. You shared a link to your whole base, and then I clicked on your link, and then I clicked on “COPY BASE” to copy your base into my own workspace. After I did that, there were no automations in my copy of the base. I wonder if other people are experiencing this same bug?
Oct 25, 2020 11:19 PM
I also faced the same.
I replicated the automation , but the images are not downloading , just a file name… could not figure out what is the problem. The images are stored in a google drive and the attachments are in the Airtable base with a Attachment field empty. Is it something to do with permissions ?
Oct 26, 2020 12:40 AM
Please note that Airtable must be able to « see » this attachment.
Airtable is not connected to your Google account so is considered as « public » when getting the file from URL.
You have to make sure that the file / folder in GDrive is shared as public.
If you can’t make it work, just send me an example URL and I will try to figure it out.
Please note that I built an Airtable <-> Google Drive integration. Do not hesitate to send me a private message if you are interested and wants more information on this.
Florian
Oct 26, 2020 03:50 AM
Thank you so much. The URL links were HTML files . That is why they were not working. It is working with links of images.
Nov 03, 2020 01:56 PM
I have the same issue, when importing this base the automations are missing. I had the same issue a few days ago when I attempted to share my own base with automations in it, the scripts weren’t carried over.
Nov 03, 2020 02:01 PM
Hi @Tim_Mackey
Actually, this does not require scripting.
It works using only Automations with Update Record action as shown on the screenshot.
Nov 03, 2020 02:15 PM
Oh perfect, that’s really simple! Thanks!
Dec 10, 2020 06:09 PM
Works great! Tho there’s a minor issue: Label gets lost.
It just uses the filename as label, in which means any custom label and spaces will be removed.
It’s surprising Airtable doesn’t already convert LABEL (URL)
to attachments, even when it was originally an attachment converted to text. :thinking:
But oh, well. What can you do? I hope someday I can re-format the labels in batch using a backup of the original label I made in a separate field.
Jul 17, 2021 10:41 AM
Hi Florian, I did not succeed to make it using this tutorial.
I have a database with url to images host on a third website and I just need to turn it into attachement into Airtable. I do not understand what I am doing wrong. Would you accept to help me ?
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”.