2

Background:

I started a new Google Apps Script project on November 1, 2018. The project creates a custom GMail add-on. Things were working. Then, on November 14th, Google released some features for the CardService:

The Card service has been extended with the following new classes and methods that let you to customize the background of text button widgets: TextButtonStyle TextButton.setBackgroundColor(backgroundColor) TextButton.setDisabled(disabled) TextButton.setTextButtonStyle(textButtonStyle)

So, I started using some of these (poorly documented) new features. As an example:

CardService.newTextButton()
              .setTextButtonStyle(CardService.TextButtonStyle.FILLED)
              .setText("Filled Button Verb")

This was appended to a CardService CardSection that was totally fine. When saving this code, the GMail Custom Add-on displayed the following error message:

Unsupported add-on Please refresh the Gmail app to use this Add-on.

  • I try refreshing the page: get same error message.
  • I quit chrome and reload the page: get same error message.
  • I load incognito tab: get same error message.
  • I MANUALLY COPY AND DEPLOY the project: get same error message.

When the code is removed and saved, the error message goes away and the Custom Add-on works as it did before.

enter image description here

Rubén
  • 34,714
  • 9
  • 70
  • 166
Joseph Combs
  • 909
  • 9
  • 12

1 Answers1

1

Your code helped me to get this to work.

I ensured my app is upgraded to a Google cloud project (GCP). This means it's a gsuite add-on, and not a script Gmail add on. It looks like they're transitioning from script apps to gsuite.

Maybe this was the reason you were struggling?!

M--
  • 25,431
  • 8
  • 61
  • 93
Bob Trial
  • 9
  • 3
  • 1
    Yes - I actually did circle back to this and buttons constructed in this way ***do*** work now. I bet my project was silently upgraded to a GSuite Add-on. – Joseph Combs Apr 08 '20 at 20:33