I am trying to publish an add-on for google sheets.
When I click on the add-on's icon in the sheets sidebar, the error message is:
No homepage card is provided for the host app: Google Sheets.
appsscript.json
{
"timeZone": "Europe/Paris",
"dependencies": {
"enabledAdvancedServices": [
{
"userSymbol": "Sheets",
"version": "v4",
"serviceId": "sheets"
}
]
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8",
"addOns": {
"sheets": {}
}
}
No homepage card is provided for the host app: Google Sheets.
You should add a homepageTrigger inside appsscript.json that calls a function with your sidebar code:
Something like this:
{
"timeZone": "America/New_York",
"dependencies": {},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets.currentonly",
"https://www.googleapis.com/auth/script.container.ui"
],
"runtimeVersion": "V8",
"addOns": {
"common": {
"name": "Translate",
"logoUrl": "https://www.gstatic.com/images/branding/product/1x/translate_24dp.png",
"layoutProperties": {
"primaryColor": "#2772ed"
},
"homepageTrigger": {
"runFunction": "buildSideBar"
}
},
"sheets" : {}
}
}
Then inside your code.gs file write your function buildSidebar() {}