Help

Re: MAKE failed to upload attachment PDF to update a record

1407 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Webguy
4 - Data Explorer
4 - Data Explorer
  1. I create a GDOC with MAKE
  2. I get fields from AIRTABLE and update the DOC
  3. I get the DOC link and put it in a URL field in the AIRTABLE record

ALL IS OK till here

  1. I am trying to get the PDF export link and upload it to the attachment field in AIRTABLE, and it doesn’t work.
    I even tried a static PDF from DRIVE and it doesn’t work.

Why?

6 Replies 6

Your document needs to be in a publicly-accessible folder, and you need to use the “Get A Share Link” module to get the web download link.

Also is the shared file link you are using in format like this?
https://drive.google.com/uc?id={fileID}&export=download

Which is interesting because while Make says “share link”, it really needs the download link as mentioned by @Greg_F. I suspect Make will take the share link but likely converts it behind the curtain to a download link.

Make is not providing the share link, Google is. Make is just providing an easy front-end to Google’s API that provides the share link.

Here’s an example of what some Google Drive modules look like in Make:

Screen Shot 2022-11-11 at 1.49.24 PM

I totally get that. What I’m saying is that a Share Link is not what Make actually uses under the covers. It must be transforming the share link into a download link, otherwise, it would not be suitable for Airtable’s upsert into an attachment field.

Sorry for confusing matters here.

I understand what you’re saying — that there is a difference between a “share link” and a “download link”

And you are absolutely 100% correct.

What I meant to say in my instructions above is that even though you use Make’s “Get a Share Link” module, that module then returns several different values in a JSON response from Google. One of these values is Google’s “Web Content Link” (which is the web content download link).

This “Web Content Link” (aka “web content download link”) is the value that you must choose to insert into Airtable’s attachment field.

Below is a sample of the JSON data that is returned by Google when using Make’s “Get A Share Link”:

[
    {
        "kind": "drive#permission",
        "id": "anyoneWithLink",
        "type": "anyone",
        "role": "reader",
        "allowFileDiscovery": false,
        "shareLink": "https://drive.google.com/file/d/1AVKCBfygmtg9WEb5sPgyJ8vVWbZTuXiO",
        "webContentLink": "https://drive.google.com/uc?id=1AVKCBfygmtg9WEb5sPgyJ8vVWbZTuXiO&export=download"
    }
]