Help

Re: Native URL to Attachment

11531 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Florian_Verdon2
7 - App Architect
7 - App Architect

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)

URL_To_Attachment

Demo base available here

Florian

28 Replies 28

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

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:

image

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.

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 :

  • Preview link (with the nice “previewer”)
  • File download link (when clicked → triggers a download automatically)

(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

Benjamin_Watrou
6 - Interface Innovator
6 - Interface Innovator

That last post was me just pasting the link.

As explained above, you link is a “preview link”.
Please take the time to read my answer and visit the link I gave you.

Benjamin_Watrou
6 - Interface Innovator
6 - Interface Innovator

Took “the time” (all afternoon) to read your answer, the link you provided, and changed the links, however this is my output still:

image

These URLs, from the article, work in a browser, but not in my update record automation.

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

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

Benjamin_Watrou
6 - Interface Innovator
6 - Interface Innovator

Sorry. Correction. Working URL replaces “export=download&id=” with “id=FILE_ID_HERE”.