【发布时间】:2018-04-04 08:59:41
【问题描述】:
我有一个 Google 表格,我想检查一个电子邮件地址是否已存在于我的联系人列表中。
我用这个函数写了一个 Apps 脚本
function isAContact(email) {
if (null != ContactsApp.getContact(email)) {
return 1;
}
return 0;
}
如果我直接在 Google Apps 脚本中运行此函数,它会在第一次运行时请求许可后正常运行。
当我在 Google 表格中调用此函数时
=isAContact(H4) // H4 is a cell with an email address
它抱怨 调用 getContact() 的权限被拒绝。
如何允许此电子表格使用 Contacts Api?
【问题讨论】:
标签: google-apps-script google-sheets google-contacts-api custom-function