Access PDF file from Google Drive error

KJT
Bronze 1
Bronze 1

I have an issue with accessing generated pdf file from Google Drive. It doesn't happen always, but very often. 

I create a pdf file with an AppsScript from template (called from Bot). File can be "refreshed" - created again with the same name and different content. That means, I delete the old file and create a new one from the template with the same name (name of the file is contract ID).

When the file is available in AppSheet, an icon for open PDF appears and the customer can see the document. The problem is, that many times an error shows instead of document:

 

        <html>
        <body style="margin:20px">
          <div>&#39;/CUSTOMER/LAST_9988F/2024-MP1-FP-0052.pdf&#39; not found</div>
          <div>Probable cause: N/A</div>
          <div><ul><div>
   <div>Path: Root</div>
   <div>Result: FAILURE</div>
   <div>Message: N/A</div>
   <details

 

After a minute or two, the document is normally available. But for the customer, refreshing with errors is very annoying.

The action is External: go to a website, launch external, Target is [DocumentName]&"&"&UNIQUEID().

Previously I used target just [DocumentName], but in that case, the old version of the document was opened imediatelly , not the last created one. I realized, the time of showing error/old version of file in both variants is almost the same. 

Is there any solution for that - other than using a different file name each time ?

Solved Solved
0 2 467
1 ACCEPTED SOLUTION


@KJT wrote:

&"&"&UNIQUEID()


I use:

& "&at=" & ENCODEURL(NOW()+1)

Not sure if that will make a difference, but you're not actually specifying the "at=" parameter, so hopefully it will.

 

View solution in original post

2 REPLIES 2


@KJT wrote:

&"&"&UNIQUEID()


I use:

& "&at=" & ENCODEURL(NOW()+1)

Not sure if that will make a difference, but you're not actually specifying the "at=" parameter, so hopefully it will.

 

KJT
Bronze 1
Bronze 1

It look that works, after few days of testing still no error. Thanks!

 

Top Labels in this Space