แสดงไอคอนไฟล์แนบ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ส่วนเสริมของปฏิทินช่วยให้นักพัฒนาแอปเพิ่มไฟล์แนบที่กำหนดเองลงในกิจกรรมในปฏิทินได้
โดยใช้
EventAttachmentTrigger
ไฟล์แนบที่กำหนดเองเหล่านี้ระบุ URL รูปภาพซึ่งจะแสดงเป็นไอคอนของไฟล์แนบภายในกิจกรรมในปฏิทินได้ (ไม่บังคับ)
เนื่องจากระบบจะใช้รูปภาพเหล่านี้ภายในปฏิทินโดยตรง คุณจึงต้องโฮสต์รูปภาพในโครงสร้างพื้นฐานของ Google
กล่าวคือ คุณต้องใช้ไอคอนเดียวกันกับที่ใช้สำหรับส่วนเสริมใน
Google Workspace Marketplace
ข้อมูลร้านค้า
วิธีรับ URL ของรูปภาพที่ใช้เป็น attachment.iconUrl
ได้
- เปิดคอนโซล Google Cloud
- หากจำเป็น ให้เปลี่ยนไปใช้โปรเจ็กต์ที่โฮสต์ส่วนเสริม
- ที่ด้านซ้ายบน ให้คลิกเมนู menu >
API และบริการ
- คลิก SDK ของ Google Workspace Marketplace ในรายการที่ด้านล่าง
- เลือกแท็บข้อมูลผลิตภัณฑ์ใน Store
- ในส่วนชิ้นงานกราฟิก ให้อัปโหลดรูปภาพไอคอนไฟล์แนบที่ต้องการ
เป็นไอคอนแอปพลิเคชันขนาด 32x32
- คัดลอก URL ของรูปภาพที่ได้ แล้วใช้เป็น
attachment.iconUrl
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-29 UTC
[null,null,["อัปเดตล่าสุด 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`."]]