Get URL of workflow generated file

So basically I have a simple workflow that creates a file from a template and saves it in a specific place in my Google Drive. This workflow happens every time a specific action is done. new files are constantly being created and saved in the google drive. How (when the file is created) can i fetch the URL of the SPECIFIC file that was created, to store in a database where users can then view each of these files?

Solved Solved
1 13 3,739
1 ACCEPTED SOLUTION

Hi Jason, give this a try and let me know if it works.

  1. Add a file column to your table
  2. Make sure you use a formula to set the filename in the โ€œSave Fileโ€ workflow.
  3. Create an action (call it โ€œset filepathโ€) that sets the value of the file column using the same formula as the โ€œSave Fileโ€ action.
  4. Add the โ€œset filepathโ€ action as an additional step in your workflow after the โ€œsave fileโ€ step
  5. Create another action called โ€œopen fileโ€ with a condition to only be visible when โ€œfilepathโ€ is not blank. The do this is โ€œopen a fileโ€ and the target is the file column

View solution in original post

13 REPLIES 13

Hi Jason, give this a try and let me know if it works.

  1. Add a file column to your table
  2. Make sure you use a formula to set the filename in the โ€œSave Fileโ€ workflow.
  3. Create an action (call it โ€œset filepathโ€) that sets the value of the file column using the same formula as the โ€œSave Fileโ€ action.
  4. Add the โ€œset filepathโ€ action as an additional step in your workflow after the โ€œsave fileโ€ step
  5. Create another action called โ€œopen fileโ€ with a condition to only be visible when โ€œfilepathโ€ is not blank. The do this is โ€œopen a fileโ€ and the target is the file column

Hi Rich
I am following the above steps ,what formula should I use for step 3
Can you please suggest the formula .

Could you please explain a little bit better with the current terminology ok automation that's in appsheet?

It boils down to where you want the URL to be

So I have an app set that when I create a ticket, in the attachment folder path I have the following: 


CONCATENATE("/",Tickets,"/",[Ticket number],"_",SUBSTITUTE([Customer]," ",""),"_",SUBSTITUTE([Sitio Name]," ",""))

This creates a new folder within a Tickets folder in google drive and set the name of the ticket number + Customer + Sitio Name. 

I would like to know if its possible to get the url of that folder created and place it  in the same record as reachable url. 

Nuevamente, debes saber exactamente dรณnde quieres la "URL". Puede que ni siquiera sea necesaria una URL

Si necesito la URL, la utilizo como un acceso directo para que cuando los tecnicos hagan los trabajos en sitio, puedan subir las fotos y los videos en la carpeta que se creo. No importa si es un botรณn o una fila mas del registro, lo mas importante es saber como generar la URL de la carpeta que se crea automaticamente cuando creo un nuevo registro.

Thanks for the response!

So, i now have my file column saved set as the โ€œFILEโ€ type.

and my formula is as follows โ€œappsheet/data/[InspectionID]โ€. the inspection ID is the name of the file, and ive tried adding โ€œ.PDFโ€ to the end of it. I keep getting a browser error of โ€œfile/directory not foundโ€, is my formula wrong or am i missing something?

do you have the file being saved to a custom path or is it just going to the app default path?

The formula you have above should look like this:

โ€œappsheet/data/โ€&[InspectionID]&".pdf"

you can also use the concatenante function:

concatenate(โ€œappsheet/data/โ€, [InspectionID],".pdf")

If you are using the default folder for the app you should just need this:

[InspectionID]&".pdf"

Hi,

My problem is that mine is being saved under โ€œANY SET PATHโ€ / Date / Month.

Is there a setting in Appsheet that does that?

How do I get rid of โ€œ/Date/Monthโ€?

Thank you!

You need to format the date without โ€œ/โ€ with the file name. It will create a subfolder. You could try to change the date for example like TEXT([Date],โ€œmm-dd-yyyyโ€).

It works thanks! i used the concatenate method and it worked perfectly!

Top Labels in this Space