修改Google表格时触发Webhook [英] Trigger webhook when Google Sheet edited

查看:113
本文介绍了修改Google表格时触发Webhook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个Google表格,用于与同事共享待办事项清单.

I made a google sheet for sharing todo list with co-workers.

我希望当工作表被修改后,将消息发送到备用频道.

My hope is when that sheet is modified, send message to slack channel.

即使试图找到与此相关的api,我也没有找到适合的api.

Even if tried to find api related with this, I failed to suitable one.

是否有适当的API或Webhook?

Is there a appropriate API or webhook?

推荐答案

有Drive API的推送通知,可让您监视资源的变化.您还可以使用Apps Scripts的 onEdit 触发器,其作用类似于真实时间检查器.

There's Drive API's Push Notifications which lets you watch for changes to resources. You can also use Apps Scripts' onEdit trigger which acts more like a real-time checker.

function onEdit(e){
  // Set a comment on the edited cell to indicate when it was changed.
  var range = e.range;
  range.setNote('Last modified: ' + new Date());
}

论坛也可能提供更多见解.

This forum might also offer additional insight.

这篇关于修改Google表格时触发Webhook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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