mhndlsz
mhndlsz

Reputation: 106

"Deploy from Manifest" then "install the Addon" for my account

Objective: "Deploy from Manifest" then "install the addon" for my account, so When I open a sheet a simple menu appears in sheet Addon menu.

I looking around literally hours to figure out this one. This is simple menu creation for sheet:

function onOpen(e) {
 var menu = SpreadsheetApp.getUi().createAddonMenu(); // Or DocumentApp or SlidesApp or FormApp.
 menu.addItem('Start workflow', 'startWorkflow');
 menu.addToUi();
}

I can't figure out how the appsscript.json should be so when I "Deploy from Manifest" and install works on all my sheets including new sheets. More info: The script is standalone without container.

I also doesn't have gsuite when I publish the Addon I just have "External" option and the addon goes under "Review".

So I Think "Deploy from Manifest" is my option but I can't undrestand how, I appreciate if you correct this for me or tell me how I can achieve my goal.

{
  "timeZone": "America/New_York",
  "dependencies": {
  },
  "exceptionLogging": "STACKDRIVER",
  "oauthScopes": [
    "https://www.googleapis.com/auth/spreadsheets"],
  "runtimeVersion": "DEPRECATED_ES5",
  "addOns": {
    "common": {
      "name": "Archiver",
      "logoUrl": "https://drive.google.com/uc?export=view&id=1Q3Yr2wSiE4s_7toyqf8XZvcdtgiyWkYF",
      "useLocaleFromApp": true,
      "homepageTrigger": {
        "runFunction": "onOpen",
        "enabled": true
      },
      "universalActions": [{
        "label": "Learn more about Cats",
        "openLink": "https://cats.com"
      }]
    },
     "sheets": {
      "homepageTrigger": {
        "runFunction": "onOpen"
      }
    }
  }
}

This is my current Deploy from manifest look like:

enter image description here

This is how my sheet look like:

enter image description here

This is how I want to look like for all my sheets including future creations:

enter image description here

Upvotes: 1

Views: 555

Answers (1)

Alessandro
Alessandro

Reputation: 2998

This is a bug

Apparently Google Workspace Add-ons don't work for Sheets, Docs and Slides despite the documentation says they would.

I filed a report in Google Issuetracker so they will take a look at this. Feel free to star it as they prioritize responding to the issues with the most stars. Here is the link: https://issuetracker.google.com/issues/170819044

Upvotes: 3

Related Questions