Hi all,
I've created an AppSheet app that logs all of the files within a Google Drive folder when the Folder ID is submitted. The app is calling on Apps Script to generate the file list. The app seems to work fine whenever I use it, however I've shared it with a colleague (to test) and it doesn't seem to work for them. They can submit a folder ID but it doesn't generate the file list. The only thing I can think of is that the apps script isn't running when they use the app. Any ideas on how to get the script working for other users?
Any help appreciated as I'm fairly rusty with Apps Script. ๐
@Chetty777 wrote:
The app is calling on Apps Script to generate the file list.
How does the AppSheet app actually "call" the App Script?
Did you check the execution log of the script?
Hey, thanks for the questions. So in answer;
The AppSheet app is calling the script via a task (call script) within a process.
I checked the execution log (great suggestion) and the script was completing for one function (clear data within sheet) but was failing for the second function (generate file list). The execution log stated that I did not have access to the folder, so once the folder was shared with me the script runs. The problem now is, I can't have every user share their folders with me so how can I get the script to run as the user??
I don't believe the script can be run by anyone besides the app-owner, using the built-in "call script" task.
You can web-deploy your script, and in the deployment settings you can set who it runs as. Then you can call the script by sending it a webhook from Appsheet.
I've never used this feature before. Is it as easy as you explain? Do you know of any useful resources I could read to set this up? Any help appreciated.
@Chetty777 wrote:
Is it as easy as you explain?
Nope...
@Chetty777 wrote:
useful resources
Google "web deploy google app script". You'll need a doPost(e) function. You can probably search this forum for "doPost" to get some good info.
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |