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,759
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