Search code examples
google-workspace-add-ons

Does google workspace marketplace give any kind of notification of installation?


When someone installs my application to their google workspace, does google send any kind of notification to my infrastructure - say via webhook?

Or am I responsible for the onboarding/first-run experience on my own, either via polling or upon the first time a user visits my application?


Solution

  • To my knowledge, Google doesn't notify you directly anywhere. To do this you have to use the licenseNotification.list API. With this you can get a list of installs/uninstalls of your app along with the user emails. A sample response would look like this:

        {
          "kind": "appsmarket#licenseNotification",
          "id": <some-notification-id>,
          "applicationId": <your-app-id>,
          "customerId": "email@example.com",
          "timestamp": <unix-timestamp>,
          "provisions": [
            {
              "kind": "appsmarket#provisionNotification",
              "editionId": "default_edition",
              "seatCount": "1"
            }
          ]
        }
    

    As you can see, it contains the email of the user and whether or not it was provisioned. It also returns a nextPageToken with the last notification id, so you can store it and send it in your next request as startToken and get results after the last notification you got. With this in mind, you could build some kind of Pub/Sub service to poll the API periodically and notify your app when you get new provisioned users.

    Reference: