What is the best way to retrieve and view files in app that are generated from templates?

Hu Guys, how are you doing ?

Doing some research here on the community I came to this awesome topic.

I was wondering if I could count on you to help me with Get Url formula.

Firstly I used the formula suggested on this link https://help.appsheet.com/en/articles/2744751-email-attachment-file-archiving and It worked. Then for some reason the suggested formula stopped running.

Please find on this link a demo video to better show the problems I am facing https://drive.google.com/open?id=1KwL47Gwzsccp_kWd3c2jYPFaXiovnaHa&authuser=costa%40costaevalle.com&usp=drive_fs

On this video the formula was working https://drive.google.com/open?id=1L0kAiJv8ETAW5yKtkq9kCIGGnsd_iVV9&authuser=costa%40costaevalle.com&usp=drive_fs

Kind regards,

Hi Fabian

I’m trying to troubleshoot why I can’t open the file I generate in the app and found your comment.

Is it really required to have the spreadsheet inside the app folder?
I couldn’t find this written anywhere in the Appsheet documentation :thinking:

Update: Unbelievable… This has solved my problem. Thanks!!!

@Steve, can we get this documented somewhere? (unless I missed it)…


Yes, at least in some cases, I believe it is correct that currently the file/item folder path is based on the location of the sheet. I have not played with this in a dedicated fashion to determine if in all cases this holds true. And what happens when its a database?

However, I believe this to be a flaw. It is my strong opinion that all pathing should be based on the Default app path set in the app regardless of where the sheet is located. I think I opened a Feature Request for this a long time ago. Maybe its time to find it, dust it off and resurrect it?


Adding @praveen for more insight on this :slight_smile:

Here’s an answer from Praveen on this issue:

1 Like

Hey Guys, I am trying to make my emailed attachment pdf to be aaccessible from the link in the app. I am trying to understand the basics of linking to one specific file on my google drive for now. I can’t get it to work. The file path in the google drive is mydrive/appsheet/data/attachments/SITECH_723242305_V15.pdf
I have a column that is a FILE type. My initial value is URL to the file which looks like this.

I get 404 file not found. What am I doing wrong?


Firstly, the paths of your stated G-Drive location and that used in the Initial value are not the same at all.

Second, is this a file that is generated from a workflow? If so, it my understanding, that the storage path of the file is based on the location of your data sheet.

I will guess that your sheet is stored at mydrive/appsheet/data. When an email workflow is run and no path is specified for saving of the generated file, AppSheet will use the folder “Attachments” by default (if I remember correctly). This means any generated files by this workflow will be stored at "mydrive/appsheet/data/attachments"

In the app, when attempting to specify the location of the stored file, you need only specify the path from the sheet root folder which in the example above is the "data" folder.

So you would want to use the path "/attachments/SITECH_723242305_V15.pdf" in your File column.

Hi @SITECH_Mid-Canada I think you use a Workflow to send a PDF as an E-Mail and archive it to your Google Drive.
So your workflow setting includes “AttachAndArchive”.
In “Attachment Folder Path” you can set your own path. But: this will always be located in the folder where your google sheet is located.
Out of the box it will save your PDF files to:
I would also recomend to disable Timestamp.

Everything you need to know is written in this help article:

1 Like

If you are using Microsoft instead of Google you can easily use Power Automate to save the name of the archived file into an Excel table which can be viewed in App.

  1. Create a table to hold list of reports - bring into App

3 columns
Report Date,
Report Name,
Report Link (=Hyperlink(Report Name)). This is a an Excel formula

  1. Save and Archive using workflow.

  2. Use MS Power Automate to create a workflow
    When a file arrives in specified folder
    Get file info
    Add a row to Excel table with file info

    This runs automatically every time a file arrives in specified folder so Excel table is always up to date


Thanks for the tip John. However my sheet is actually in the root directory of my g drive. But you are correct the attachements are stored in appsheet/data/mynewapp-505828/Attachments.I tryied this link as you suggested

didn’t work

I have seen a conversation above that the sheet needs to be in the myNewApp-50582 directory for the links to work. I moved it and it broke everything. I have pictures and signatures and barcodes in that sheet. they all started acting wonky. And by wonky I mean not displaying randomly. Moving back didn’t fix it. So I had to delete the source in appsheet move he sheet and reconstract everything. Sorry I side tracked.

I also tryied using this expression


and i just get this in my browser adress

So my syntax is wrong i just dont know where?

You are exactly right. I generate a PDF from a template and it is stored in a default directory. What I am trying to do next is put a link to this PDF directly into my sheet. It is usefull if I want to say print the pdf from the app without having to look for it in the emails.

Thanks I will consider this as my fall back plan if I cant figure out this “link” thing.

Please see at the bottom of this article
“Constructing an Attachment File URL”

1 Like

This works perfectly. Thank you so much @WillowMobileSystems .
It seemed much more complicated than what it actually was.

Yes please have my upvote. It makes sense to think it’ll default relative paths from appfolder and not the spreadsheet location. This not only makes it breaking change when moving spreadsheet, but it is also very unintutive, what if you have sheet on one data source and image on other.

I wish to add my vote to this behaviour. Does AppSheet have a feature request for this?

Could you help me do this? My company already has a folder system that contains many files in it. Inside those files are pdf’s (invoice). So, I am not having the user input/download the pdf - they are already there.

My users want to be able to find those pdf (Invoices) and either:

View it in app
Print it
Email it

How do I do this?

Does this only work if you are building/generating the pdf in/through the app? Or can I use this to search a drive and find a pdf with CONTAINS?

Hi @Tiger would that be a solution for you?

1 Like

I had been out on vacation. Did you get the answers/solution you were looking for on your questions? I see some posts after this one on the topic.

Hey. Thanks for the response. Sorry - now I was out :grinning:

No - I am confused on how to be able to do this. I see post on finding the document (IF you placed it in a file/folder - using the app). But I am not putting files in folders using the app.

I need the app to be able to search a file/folder system and locate a pdf without having placed it in using the app.

Does this make sense?