Call a Web App URL to execute a script

HiI all,
I hope I can explain what I want to do.
I have a Google Sheets as my source for the AppSheet App and within this Google Sheet I have some function that do some calculation or fill out a Google Sheet so that a PDF is created, which is then sent.
I would now like to call a special function from the AppSheet app that carries out this action of creating and sending the PDF and I would like to pass on various parameters such as username etc. Can something like this even be built? I already have the web app URL and if I run it manually, it also creates the PDF document for me and saves it. But I can't provide any values. Can I implement this in any view in AppSheet so that values are entered or selected there and then the function is started with a click on a button?
Thx, Mario.

0 3 1,464
3 REPLIES 3

That's a good approach, but the automation can only execute standalone scripts.
But how can I use it so that functions from the Google Sheet Apps Script that belong to the project are executed. I also have to be able to pass data somehow - i.e. parameters such as USEREMAIL() or year and month...
Is this somehow possible? Or do I have to write a separate script that somehow gets data from the AppSheet tables?

I would just convert your script to be standalone, that's not difficult. Probably just switching getActionSpreadsheet() to openById().

Otherwise yes you could still do it by passing URL parameters in to your doPost or doGet function of a web-deployed script.

Top Labels in this Space