0

Is there a way to write an apps script function that opens up google workspace marketplace with a specifc addon page? I've seen some addons do this.

Like i want to create a button drawing on my sheet and assign an apps script function to it that opens up the marketplace on that sheet with a single click.

Screenshot

1 Answers1

0

You can't open a Dialog like the mentioned

Google Spreadsheet cannot contain a button that opens an iframe since it's outside docs.google.com

As a workaround you can open the add-on link in another tab rather than in a dialog on the same Spreadsheet page. There are several posts related despite they are not the same in your case but pretty much what you are looking for:

Jose Vasquez
  • 1,489
  • 1
  • 5
  • 14
  • It's not impossible, for example look [here](https://coefficient.io/start) they do this in the new spreadsheet they create, they have a button that runs a script which opens google workplace marketplace in a dialog – Peepooooooooooo Feb 09 '21 at 04:44
  • I think the link you provided is not related to the content you mention. When it comes to open [Dialogs or Sidebars](https://developers.google.com/apps-script/guides/dialogs) you can define a link inside of it that opens the external link, but you can't directly open the marketplace in an iframe given the screenshot you provided. – Jose Vasquez Feb 09 '21 at 08:29
  • 1
    If you go to that link and provide an email address they'll redirect you to a google sheet and in that sheet when you click the button, google marketplace opens up in a dialog... – Peepooooooooooo Feb 10 '21 at 05:26
  • As I've seen in the button example. There's nothing related in the official documentation. It's true that this is not impossible to do, for some reason that we don't know this functionality is obfuscated to the public though. Unless we don't see the code we have nothing much to do. According to the official documentation my answer is valid but this is not true at all. – Jose Vasquez Feb 12 '21 at 13:06