So I have a very useful script which goes through a lot of my Google Documents and merges them into a single pdf. The problem is - it takes minutes to run!
I want to add a doGet()
function, but the GET request times out before the code is done. Is there a way that I return some HTML to the user yet also run the script?
Or is there a different approach?
My idea was to serve a page to the user, saying: "Your file will be done in a minute. Once it's done you will be able to view it here", but replace the "here" with a URL to a different GAS which would either display the file if it is done or display "You might have to wait a bit" if it isn't yet. I do know how to achieve that.
But how can I call the script which creates the file and also show some output to the user? Both of these when a user enters some GAS, calling a doGet()
function.
Tank you in advance