我们已经发布了 Google Sheets 插件,但新用户在安装后通常不知道如何访问该扩展程序。目前,这是我们默认显示的,但我不知道如何更改它。
我注意到一些附加组件包含一张带有类似这样的说明的图像。我怎样才能做到这一点? 这就是我想要的。
谢谢!
相关文档:
Gemini 提出了一个可能的解决方案,但它与 manifect 结构 冲突。将 onInstallation 添加到 appsscript.json
{
"manifestVersion": 2,
"name": "My Addon",
"description": "A sample addon that displays a custom message on installation.",
"developerMetadata": {
"supportsDomainWideInstallation": false
},
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets"
],
"iconUrl": "https://www.example.com/icon.png",
"onInstallation": {
"type": "message",
"message": "Thank you for installing My Addon!\n\nTo get started, follow these steps:\n1. Click on the addon icon in your Sheets sidebar.\n2. Select the 'Instructions' tab.\n3. Follow the instructions on the page.",
"image": {
"url": "https://www.example.com/instructions.png"
}
}
}
导致错误:“清单无效,未知字段:homepageUrl、onInstallation。”
LLM的另一个选项,添加到manifest.json中,这不是我想要的情况。它显示在工具栏的右侧。我想要它在扩展菜单上显示,并显示安装后的图片,如图 2 所示。
"addOns": {
"common": {
"name": "XCelsior AI: GPT for Sheets",
"logoUrl": "https://your-logo-url.com/logo.png",
"useLocaleFromApp": true,
"homepageTrigger": {
"runFunction": "showPostInstallTip"
}
},
有两种类型的插件:
编辑器插件通常与在“扩展”菜单 >“插件”中创建菜单项一起使用
另一方面,工作区插件在侧边栏中创建一个图标/按钮。
似乎创建了一个编辑器插件,但它是作为工作区插件发布的,为您提供了屏幕截图中所示的界面说明。清单中的
addOns
键用于配置工作区插件。重组您的清单以删除 addOns
键及其值,然后重新发布到市场。如果有任何特定的市场设置,您可能也需要更改它。 一旦市场将其识别为编辑器插件,您就应该拥有您正在寻找的界面。