远程编辑Google文档 [英] edit google document remotely
问题描述
我试图在我的网站上添加一项功能,如下所示:
点击按钮将文本追加到Google文档中。
显然我需要在驱动器中创建一个Apps脚本。 问题是如何从我的网站触发Apps脚本。您可以假设我是驱动器/文档的所有者,因此有权以任何我喜欢的方式对其进行编辑。
我曾看过这些主题:
看来它们都是从驱动器本身执行的操作,并不是远程触发的。
我也在谷歌中查找了Apps Script API,但还没有找到办法做到这一点。这是可能的吗?
是的,这是可能的。
首先编写一个Apps脚本,用于更改所需的文档。然后将其部署为以您身份运行,任何人都可以访问,甚至是匿名的。查看Apps脚本页面上的指南,了解如何将脚本编写为您的脚本将有一个公共网址,您可以从您的网站打电话并让它正常运行远程。
$ b$ b
I'm trying to add a feature to my website as follows:
Clicking a button appends text to a Google document.
Obviously I will need to create an Apps Script in the drive. The question is how to trigger the Apps Script from my website. You can assume that I am the owner of the drive/document and so have permissions to edit it in any way I like.
I have looked at these topics:
- Workarounds : How to edit native google documents programatcally?item
- How to programmatically manipulate native google doc files
It seems they are all actions performed from the drive itself and not triggered remotely.
I have also looked up the Apps Script API in Google but have not found a way to do this. Is it even possible?
Yes, it is possible.
First write an Apps script that changes your desired document. Then deploy it as a web-app running as you that anyone has access, even anonymous. Check out the guides at Apps Script page to see how to write your script as a web-app.
Your script will then have a public url, which you can call from your website and have it run "remotely" normally.
这篇关于远程编辑Google文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!