Trigger webhook when Google Sheet edited

送分小仙女□ 提交于 2020-05-26 06:24:46

问题


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.

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

Is there a appropriate API or webhook?


回答1:


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.



来源:https://stackoverflow.com/questions/47690332/trigger-webhook-when-google-sheet-edited

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!