Hello, my form has various fields like imags and files. I want appsheet to upload my images and files directly to GDrive while submitting the form and Gdrive link should be pasted in the respective cell in Google Sheets. If there is a solution, please explain in detail because I am new to appsheet and It would be a great help!! Thank You
This is default behavior.
The relative path (from the base spreadsheet, typically) to the file will be the Text value that is saved in a File/Image column.
Appsheet isn’t going to be able to figure out a GDrive link, because it has no way to access the GDrive file ID (or rather, it has no way to expose it to the user). To do that, you’d have to use a Google App Script or similar.
If you’re just needing a public URL to the file, please review the “External URL for Image Files” section in this help doc:
I realized something similar to your idea.
After you upload file to appSheet by default appSheet save it on G-drive. You have just one option to get link to file it’s use “ Google Apps Script”.
Use file links more convenient if someone on back have to rename or move file between folders. App still working because access to file by link.
Let me know if you need more about it.
Thank you @VOLODYMYR_TYROL for your kind reply. Can you please breifly guide me on that. Thanks Again.
Any time, AppSheet community help me a lot. I want share it forward.
In database(G-Sheets) I created next columns:
Key, “File path”, “File Name“, “File ID”.
Column “File path” - it’s file type in AppSheet. Originally after you uploaded file appSheet write down path to file.(exp. …appName/folderName/fileName)
Column “File Name” it’s text type in AppSheet with initial spreadsheet formula (Spreadsheet Formulas | AppSheet Help Center): we going to get File Name from column “File path” By SPLIT () and INDEX().
Example we have in column “File path” next data “ appName/folderName/fileName”. So our formula looks: =INDEX( SPLIT (column “File path”, “/“) ,3).
Column “File ID”, will be filled with “ Google Apps Script” with custom formula. Also “ Google Apps Script” Formula have to change column “File path”
to file Url.
I going to share my “Google Apps Script” code in couple hours
Using to read Google Drive folder as a table feature, you can get the Google Drive file Ids without scripting the codes now.
Then we can manipulate image/file data, relying on file IDs.
Thank you for your advice, never heard of it before.
This is just for users for those who use Google (drive) as data source. Once we save files, images or other types whatsoever, we are instantly able to get the Google Drive file IDs. Then can consume them to create download URL, create copy, get the unique URL (which is not affected by the location of file) etc.
We deploy some apps to our end users to upload mutiple files to appsheet app using this features as well.
We can do more with this read folder as table feature, althogh we have limited capabilities, such as limited availabiliies for meta data, nor not able to read sub folders etc
Can you please explain more about this part?
The most useful and reliable info source is this.
Thank You @tsuji_koichi for assistance. Can you please help me how should I integrate this in the appsheet?
With which part you need help?
Like how can I get google drive link in my excel sheet.
You mean that you would like have access to each file by link?
All files going to stay in one folder or many?
each row has a seperate folder, which contains 8 files. I want link for each file in a row in their seprate columns.
Do you want use existing files or upload new files?
If I understand right you want create something like for each user or employee folder and each folder have the same number of files?
Hi @sainikhushdeep ,
We don’t have support for nested folders yet, so depending on how many employee folders you need, this drive folder as a table feature may not be feasible right now for you. You would essentially have to add a table for each folder as the app creator…which would be very clunky in your app beyond just a few employees.
- There are some posts with some suggestions to use Apps Script to fill up your sheet with the links you want. If you have a lot of employee folders, this could be the most efficient way to generate all of your file links programatically.
- We have plans to add subfolder support to the Drive data source, and once this is available, your existing model should work well to get the file id’s for all of the files in the Employees/employee folders. I don’t have a timeline for this…engineering is still investigating best options for implementing this and we are prioritizing with lot of other feature requests as well.
- If you want to use the drive data source to easily get the file ids today (and not have to use apps script), you would have to re-organize your files to put them all in a single folder…you could prepend all of the file names with the employee id or name for example, so that they would sort together in a drive filename view…but then the drive table in your app could have immediate access to all of the file ids and you could use some virutal columns to generate your drive links or use automation to write them to another table backed by a sheet, etc…
Thanks for improves appSheet.
For my client very important file management on G-drive. All files sorting by 50+ folders. I wrote logical part in “File Path“ and it’s sorting good. Just one problem it’s file name. I have change it in “ Apps Script”. I will very appreciate if appSheet team do special field for File name or file name based on column value
Only new files.