0

sorry if this question doesn't have all the necessary information (I'll edit it as I go if I'm missing something critical) but my Google Workspace Add-on isn't showing up after I click on 'Test Deployment' in Google Apps Script.

I have my appsscript.json and Code.gs file and also linked my project to a Google Cloud Console project with my Google Calendar API enabled (this is the app that I'm creating the add-on for). It didn't even ask me for authorization to my Google Calendar so already I know something is wrong.

I've been stuck at this for days. Would really appreciate the help!!

Tried playing around with the different deployment options. Ensured my code is working as intended.

Nothing seems to make that add-on show up in my Google Calendar or the Google Workspace Marketplace.

2
  • You can edit your post with this in mind, "How to replicate the issue and what are my expected results" this will make your question clearer. Please edit your post accordingly, include the manifest.json, along with your current code the code can be on a bare minimum just the part you are having issues with. Have you also had a chance to visit this article? https://developers.google.com/workspace/add-ons/editors/docs/quickstart/translate
    – Babanana
    Commented Jul 16, 2024 at 3:07
  • Understood. I'll make sure to include all this information next time. Thank you Commented Jul 18, 2024 at 1:18

1 Answer 1

0

There may be a lot going on but I hope this checklist helps:

The deployment should be a "Google Workspace Add on" and it should give you the option to install the addon in the same screen if:

  • The Code

    • Here it may be really useful a bit of the code, but assuming you have an OnOpen function this should be fine
  • The Apps Script Deployment

    • As you mention you are developing a Workspace Add-on so you have made that test deployment
  • The Manifest

    • If you have the right objects in your manifest you will see the "Install" options in the test deployment
    • Next to it you will see the applications where the add on will be visible (calendar in this case)

if in your manifest you don't have this on your manifest you won't be able to install the addon on calendar

"calendar": {
      "eventOpenTrigger": {
        "runFunction": "onCalendarEventOpen"
      }

The authorization part depends on the scope section in the manifest

"oauthScopes": [
    "https://www.googleapis.com/auth/calendar.addons.execute",
    "https://www.googleapis.com/auth/calendar.readonly"
  ],

Also take a look on that

You can check the link for a useful example

https://developers.google.com/workspace/add-ons/quickstart/cats-quickstart#set_up_the_script

I Hope this helps you

3
  • Sorry but my code.js file is having an issue. I'm getting the following error: Error with the add-on. Run time error. TypeError: Cannot call method "getId" of undefined. [line: 5, function: onOpenEvent, file: Code] Commented Jul 18, 2024 at 1:19
  • This is part of my code: function onCalendarEventOpen(e) { Logger.log("onCalendarEventOpen triggered"); Logger.log("Event data: " + JSON.stringify(e)); if (!e || !e.calendarEvent) { Logger.log("No event data found or e.calendarEvent is undefined."); return CardService.newCardBuilder() .addSection(CardService.newCardSection() .addWidget(CardService.newTextParagraph().setText("Error: No event data found."))) .build(); } Commented Jul 18, 2024 at 1:20
  • the object where you are trying to use the getId method has an issue, but i don't see it on the code you post
    – GerardoRZ
    Commented Jul 18, 2024 at 16:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.