使用Google云端硬盘API时不会触发onChange触发器 [英] onChange Trigger not firing when using Google Drive API

查看:64
本文介绍了使用Google云端硬盘API时不会触发onChange触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个后端Ruby应用程序,可以使用其API更新Google云端硬盘中的文件.在这些文件上,我正在运行Google App脚本.当我使用后端红宝石脚本更新Google驱动器中的文件时出现问题,Google App脚本onChange或onEdit触发器不会触发.只有当我通过浏览器进入文件并自己编辑某些内容时,它们才会触发.有人知道为什么吗?还是可以解决的?

I have a backend Ruby app that updates files in Google Drive using their API. On those files I have Google App Scripts running. I am having an issue when I update a file in google drive using my backend ruby script the Google App Script onChange or onEdit triggers don't fire. They only fire if I go into the file through the browser and edit something myself. Does anyone know why this is? Or a work around for it?

谢谢!

推荐答案

Apps脚本的onChange和onEdit触发器不响应 Google表格API .它们仅响应用户在浏览器用户界面中所做的更改.

The Apps Script onChange and onEdit triggers don't respond to changes made by the Google Drive API or the older Google Sheets API. They only respond to changes made by a user in the browser UI.

这篇关于使用Google云端硬盘API时不会触发onChange触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆