ทรัพยากรไฟล์ Manifest ของ Homepagetrigger
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การกำหนดค่าทรัพยากรที่ใช้เพื่อกำหนด
ทริกเกอร์หน้าแรกของส่วนเสริม Google Workspace
HomepageTrigger
การกำหนดค่าไฟล์ Manifest ของส่วนเสริม Google Workspace สำหรับ
ทริกเกอร์หน้าแรก
ทริกเกอร์หน้าแรกสามารถกำหนดได้ใน
addOns.common.homepageTrigger
ทรัพยากรหรือทรัพยากรของ
แอปพลิเคชันโฮสต์แต่ละรายการ
ทริกเกอร์หน้าแรกของแอปพลิเคชันโฮสต์ หากกำหนดและเปิดใช้ จะลบล้าง
ทริกเกอร์หน้าแรกที่กำหนดไว้ใน
addOns.common.homepageTrigger
ดูรายละเอียดเพิ่มเติมได้ที่การกำหนดค่าหน้าแรก
การแสดง JSON |
{
"enabled": boolean,
"runFunction": string
} |
ช่อง |
enabled |
boolean
เปิดใช้การ์ดหน้าแรก (ไม่ใช่ตามบริบท) สำหรับแอปพลิเคชันโฮสต์นี้หรือไม่ ค่าเริ่มต้นคือ true
|
runFunction |
string
ชื่อของฟังก์ชันที่จะเรียกใช้เมื่อทริกเกอร์นี้ทํางาน หากระบุไว้ คุณ
ต้องใช้ฟังก์ชันนี้เพื่อสร้างและแสดงอาร์เรย์ของออบเจ็กต์ Card อย่างน้อย 1 รายการ
เพื่อแสดงเป็นหน้าแรกของส่วนเสริมนี้ในแอปพลิเคชันโฮสต์นี้
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eHomepage triggers define the configuration for Google Workspace Add-on homepages, letting you control card display and functionality.\u003c/p\u003e\n"],["\u003cp\u003eThese triggers can be set globally or for specific host applications, with host-specific settings taking precedence.\u003c/p\u003e\n"],["\u003cp\u003eHomepage triggers are configured using the \u003ccode\u003eenabled\u003c/code\u003e and \u003ccode\u003erunFunction\u003c/code\u003e fields within the add-on's manifest file.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erunFunction\u003c/code\u003e field points to a function that constructs and returns \u003ccode\u003eCard\u003c/code\u003e objects to populate the add-on's homepage.\u003c/p\u003e\n"]]],[],null,["# HomepageTrigger manifest resource\n\nThe resource configuration that is used to define\n[Google Workspace add-on](/workspace/add-ons/concepts/types#g_suite_add-ons)\n[homepage triggers](/workspace/add-ons/concepts/homepages#homepage_configuration).\n\nHomepageTrigger\n---------------\n\nThe Google Workspace add-on manifest configuration for\n[homepage triggers](/workspace/add-ons/concepts/homepages#homepage_configuration).\n\nHomepage triggers can be defined in the\n[`addOns.common.homepageTrigger`](/apps-script/manifest/addons#Common.FIELDS.homepageTrigger)\nresource or the resources of the individual\n[host applications](/workspace/add-ons/guides/glossary#host_or_host_application).\nThe homepage trigger of a host application, if defined and enabled, overrides\nthe homepage trigger defined in\n[`addOns.common.homepageTrigger`](/apps-script/manifest/addons#Common.FIELDS.homepageTrigger).\n\nSee [Homepage configuration](/workspace/add-ons/concepts/homepages#homepage_configuration)\nfor more details.\n\n| JSON representation |\n|-----------------------------------------------------------|\n| ```text { \"enabled\": boolean, \"runFunction\": string } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enabled` | `boolean` Whether or not homepage (non-contextual) cards are enabled for this host application. Defaults to `true`. |\n| `runFunction` | `string` The name of the function to run this trigger fires. If specified, you must implement this function to build and return an array of one or more [`Card`](/apps-script/reference/card-service/card) objects for display as this add-on's homepage in this host application. |"]]