This worked very well!!
Now the twist more... how we could generate a link for a file that I create by means of a bot?
Where you need that link?
We have a bot that generates a document. And we need to send that document to an external application (via JSON). For this we need the link.
When we load it from the PC there is no problem, the previous solution works, but if we generate it from the bot... well we don't know
as well as a script. you have a place a file is created, there is a file name. the script will do the rest
And... Is it possible via appsheet? Whitout scrips....
I think no. the script is not hard
How? We never do it
I went fishing, in a couple of days there will be a computer, I will write a script. If no one does it first
this script can find a link to a file. title you can transfer from Appsheet. and return back download_link. More information is on this forum.
Thanks koma!
How do we use the script in Drive?
https://script.google.com/home/start?pli=1
create a new script and paste the code into it. then connect it to the bot in your app. and receive a Link as a return value. Yesterday there was an article on this site on how to do it.
You need to pass only the file name to the script, and get back the link
Hi Koma,
The bot looks like this:
The first step generates the document and the second step is the script and the third is the json that sends the document to the web page for its digital signature.
The point is that the link we have to send is the access link, for example:
What we did was generate a doc with the following name:
And in the script we put the same statement:
The JSON is:
When running it sends everything fine, but the third party program can't open it.
We think it's because the json doesn't recognize the download link, but it has to be like the one in the example... rather access...
Try to replace in the script:
file.getDownloadUrl()
on the
file.getUrl()
I don't know how else to help
And how do we save the generated doc in a column?
Because in this case we can use the anterior solution...
What we need more precisely is a link that identifies the type of file (pdf, jpeg, etc.) that is being generated
If we could put the link of the file in a column, like when it is uploaded from the pc, we could generate the link
or you can write a google script that will monitor the table, take the file name from it and return a link to the file located on the google drive
[_THISROW].
User | Count |
---|---|
17 | |
11 | |
7 | |
5 | |
5 |