How to call the PDF Link that i created

Hi Good Day, I do have a problem with the formula. I’ve created a Automation that when I click Yes in Create PDF it with provide the link of the created PDF. But when i click it the link provided “404 - File or directory not found.”


My formula for the Actions is:

Data: set the values of some columns in this row.

CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=”, ENCODEURL(“MonthlyPerformanceReportDatabase-1750141”),"&tableName=", ENCODEURL(“Monthly Performance Report Database”), “&fileName=”, ENCODEURL(CONCATENATE("/Files/"[MONTHS],"-",[Discussion Planner Key],".pdf")))

When i check on the folder where the PDF is saved and created it’s there but when i click the link in g sheet. The error is “404 - File or directory not found.”

Thanks community if someone will help me with this. Thank you

1 10 5,070
10 REPLIES 10

Aurelien
Participant V

Hi @John_Paul_Armisa

What you want to achieve is pretty similar to what is described in this post:

You have to keep in mind that the link you want to provide is a relative path from your default folder path.
With Automation, I reproduced it this way (other similar options exist, this is ONE option).

The purpose here is to create a quote, store it in a team drive and giving access to user then.
To do so, I make an action, visible to users, to write “filename” in quoteFile column.
Then, the automation fires to create a file, because it is based on a change made on this column.

  1. create Action “write_TimeStamp_QuoteName”

With expression for the column QuoteFile (type : File):
"\Files\" &TEXT(NOW(),"YYYY_MM_DD - hh_MM_ss") & "_Quote_" & [QuoteReference]& ".pdf"

([QuoteReference] is a value from the row)

  1. Then, create a bot:

  2. here is the settings for event:
    3X_0_8_086dbc14e2a1451d4648cef97e3f41279407758e.png

Expression : [_THISROW_BEFORE].[QuoteFile]<>[_THISROW_AFTER].[QuoteFile]

  1. Here is the setting for Process:
    3X_0_4_04e32d249c0e1dc7103284b1e6b794bd7b74765a.png

  2. And the setting for the related task:

Expression :

SUBSTITUTE(
	SUBSTITUTE([QuoteFile],
     	"\Files\",""
     ),
     ".pdf","")

I think what you are specifically looking for is this last expression.

  1. Here is the result:
    a) in the app:
    3X_a_2_a2a6f9fe77d363cfe79f4d3779b9375247e4db47.png

b) in the source sheet:

c) in the team drive folder:
3X_4_9_498bbb0b7dda502eeab3bee8f2eeb32337bb807b.png

Can you let us know if that works for you, and tick that post as a solution if that answer your question ?

Cheers !

EDIT : minor changes

Is there a way to save the actual URL link of the file in the Google Spreadsheet?
The back end support people will be interfacing the Sheet and they need to be able to just click on the link in the sheet to open the file.

Hi @Aurelien, I have a doubt with this procedure. I managed to get the file URL printed in the table and access to it through the app. The file is generated when a new record is created, is there a way to create a new file that replace the old one when the record is edited?

Hi @muketaz

This is no really about replacing.

This procedure will change the value indicating the path folder to the file.

So, if you didn’t neglect to add a timestamp value in the file name, the older one won’t be accessible anymore.

Note that it won’t delete the previous file in the Drive folder.

B68431F5-3DF2-4E1C-91AC-C8763FE9EE51.jpeg

9D717FDE-36BF-41EB-AA39-3B376CE88297.jpeg

1437E7D1-78B8-4393-BA52-A6D4A6E28B65.jpeg

C38C5EEC-B308-40D0-9400-5A815914DB1B.jpeg

89C1F7E4-5F85-401D-B17C-0BA755D0B5E8.jpeg

0FEF7353-A47C-4336-ACE3-5CC500791E88.jpeg

42C72BC4-F20D-4ACF-BB45-097CE0BA07BC.jpeg

     

8F24557C-D4AB-4648-9F32-86FE5DD35D26.jpeg

A2173102-16E6-43D7-9CE5-8317BE34B4D8.jpeg

C67045C9-E6A9-4B68-A765-51E4AFC379A9.jpeg

682B6255-8A8E-4E32-A270-11BE9905A04B.jpeg

I change file names and folders . Also default folder paths . But it still says the same thing , it can’t find it 

Hi, I have my spreadsheet in a custom folder. So all the files that I upload as photos are located under that folder. But if I automatically generate a file from a task, it is generated in the default folder in (appsheets/data/{AppName}/...), my solution to access these from a column was to create a shortcut to the folder default in drive and place it at the root of my custom folder.

3tonycesar_0-1657651083382.png

- Access direct in drive: ....1001192781-22-06-18-2

- "El" Spreedsheet of my appsheet
- "In... Arroz_images" custom path for mya upload images



For access to files automatically generated is

3tonycesar_2-1657651301841.png

3tonycesar_1-1657651127885.png

 

And this is supposed to be a no-code platform?

Look at all the steps and troubleshooting required.

Why cant you make a simpler and non-daunting process for the no-coders? PDF reporting is like essential in any industries, yet you have not make it an easy process for the non-coders.

A simple 3 steps should solve this problem!

I agree!

finkployd
Participant III

But thank you anyhows for all the feedbacks. Will try to take note and try all of these steps.

Thank you everyone. 

Top Labels in this Space