更改 Google 日历中的事件表单

Changing the Event form in Google Calendar

我是 Google Apps 脚本的新手,正在尝试了解它的来龙去脉以及它的局限性。现在,我正在尝试对 Google 日历上的活动表单进行更改。我正在尝试将自定义 HTML 添加到表单中。根据文档,这对于其他应用程序(例如电子表格)是可能的,但我无法看到如何在日历中执行此操作。我在日历或事件上寻找 getUI() 函数,但引用 (https://developers.google.com/apps-script/reference/calendar/calendar-event) 没有它。关于如何处理这个问题有什么想法吗?

正如 OP 已经提到的,Google Apps 脚本的日历服务不包含 getUI() 方法。值得一提的是,它没有其他类似的方法,因此无法扩展/修改内置的 Google 日历事件表单。使用 Google Apps 脚本,另一种方法是使用 HTML Service.

创建自定义事件表单

从上面link

HTML Service: Create and Serve HTML

The HTML service lets you serve web pages that can interact with server-side Apps Script functions. It is particularly useful for building web apps or adding custom user interfaces in Google Docs, Sheets, and Forms. You can even use it to generate the body of an email.