I'm trying to create a sidebar in my Google Sheets app by using the appsscript.json file.
I'm trying to figure out how to use this tool and the JSON file it generates.
I get the following error:
"appsscript.json" has errors: Invalid manifest: unknown fields: [sidebar].
What am I doing wrong and how do I fix it?
Does Google Apps Script runtime even support the creation of sidebars in Google Sheets using the appsscript.json file?
appsscript.json
{
"timeZone": "America/New_York",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8",
"oauthScopes": [
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/spreadsheets"
],
"sidebar": {
"name": "My Sidebar Add-on",
"iconUrl": "https://path/to/icon.png",
"url": "https://path/to/sidebar.html"
}
}
CodePudding user response:
No, Google Apps Script doesn't support the creation of sidebars in Google Sheets using the appsscript.json file.
- https://developers.google.com/apps-script/concepts/manifests
- https://developers.google.com/apps-script/manifest
There are two types of "sidebars" one that requires the use of HTML Service and another that requires the use of the Card Service. The first corresponds to Editors Add-ons, the second to Workspace Add-ons.
To create sidebars using JSON that is possible for Workspace Add-ons but that implies the use of another runtime.