Cung cấp biểu tượng tệp đính kèm
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tiện ích bổ sung cho Lịch cho phép nhà phát triển thêm tệp đính kèm tuỳ chỉnh vào sự kiện trên Lịch thông qua việc sử dụng EventAttachmentTrigger.
Các tệp đính kèm tuỳ chỉnh này có thể chỉ định một URL hình ảnh (không bắt buộc) sẽ xuất hiện dưới dạng biểu tượng của tệp đính kèm trong sự kiện trên Lịch. Vì những hình ảnh này được dùng trực tiếp trong Lịch, nên bạn phải lưu trữ chúng trên cơ sở hạ tầng của Google.
Cụ thể, bạn phải sử dụng cùng một biểu tượng mà bạn dùng cho trang thông tin trên Cửa hàng của các tiện ích bổ sung trên Google Workspace Marketplace.
Cách lấy URL của hình ảnh có thể dùng làm attachment.iconUrl
:
- Mở Google Cloud Console.
- Nếu cần, hãy chuyển sang dự án lưu trữ tiện ích bổ sung của bạn.
- Ở trên cùng bên trái, hãy nhấp vào biểu tượng Trình đơn menu > API và dịch vụ.
- Trong danh sách ở dưới cùng, hãy nhấp vào Bộ công cụ phát triển phần mềm Google Workspace Marketplace.
- Chọn thẻ Trang thông tin trên Cửa hàng Play.
- Trong phần Thành phần đồ hoạ, hãy tải hình ảnh biểu tượng tệp đính kèm dự kiến lên dưới dạng Biểu tượng ứng dụng 32x32.
- Sao chép URL của hình ảnh nhận được và sử dụng URL đó làm
attachment.iconUrl
.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eCalendar add-ons allow developers to add custom attachments with optional icons to Calendar events using the EventAttachmentTrigger.\u003c/p\u003e\n"],["\u003cp\u003eAttachment icons must be hosted on Google's infrastructure and be the same icon used for the add-on's Google Workspace Marketplace store listing.\u003c/p\u003e\n"],["\u003cp\u003eTo obtain the image URL for attachment icons, developers need to upload the icon as an "Application Icon 32x32" in the Google Cloud console's Google Workspace Marketplace SDK Store Listing section and use the resulting URL.\u003c/p\u003e\n"]]],["Developers can add custom attachments to Calendar events using the `EventAttachmentTrigger`. These attachments can have icons, which must be hosted on Google's infrastructure. To get a valid icon URL, navigate to the Google Cloud console, switch to the add-on's project, and access the Google Workspace Marketplace SDK. In the \"Store Listing\" tab's \"Graphics Assets\" section, upload the icon image (32x32) as an \"Application Icon\", then copy and use the generated image URL as the `attachment.iconUrl`.\n"],null,["# Provide attachment icons\n\nCalendar add-ons let developers add custom attachments to Calendar events\nthrough the use of the\n[EventAttachmentTrigger](/apps-script/manifest/calendar-addons#eventattachmenttrigger).\nThese custom attachments can optionally specify an image URL which is displayed\nas the attachment's icon inside of the Calendar event. Since these images are\nused within Calendar directly, you must host them on Google's infrastructure.\nSpecifically, you must use the same icon that you use for the add-ons\nGoogle Workspace Marketplace\n[store listing](/workspace/marketplace/create-listing).\n\nTo obtain an image URL that can be used as the `attachment.iconUrl`:\n\n1. Open the [Google Cloud console](https://console.cloud.google.com/).\n2. If necessary, switch to the project hosting your add-on.\n3. At the top-left, click Menu menu \\\u003e **APIs \\& Services**.\n4. In the list at the bottom, click **Google Workspace Marketplace SDK**.\n5. Select the **Store Listing** tab.\n6. In the **Graphics Assets** section, upload the intended attachment icon image as an **Application Icon 32x32**.\n7. Copy the resulting image URL and use it as the `attachment.iconUrl`."]]