Gmail contextual add-on not appearing in messages

Hey everyone,

I’m having trouble with a Gmail contextual add-on I created. I made the spec file and put it on my server. I also set up the Google Apps Marketplace SDK in the developer console. But my add-on isn’t showing up in Gmail messages.

I think there might be a problem with my spec file. I’ve been trying to fix it, but no luck so far. The Google docs seem outdated, still talking about manifest files that don’t work anymore.

Has anyone got this working recently? I could really use some help with the Marketplace SDK setup and writing the spec file correctly.

Here’s a simplified version of my current spec file:

<?xml version='1.0' encoding='UTF-8'?>
<Module>
  <ModulePrefs 
    author='MyCompany'
    author_email='[email protected]'
    height='150'
    author_location='USA'>
    <Require feature='responsive-height'/>
    <Require feature='google.message-reader'>
      <Param name='extractors'>
        google.com:MessageBodyExtractor
        google.com:RecipientExtractor
      </Param>
    </Require>
  </ModulePrefs>
  <Content type='html' view='card'>
    <![CDATA[
      <p>Add-on content here</p>
    ]]>
  </Content>
</Module>

Any tips or suggestions would be great. Thanks!

I encountered a similar issue when developing a Gmail add-on. The key is ensuring that the manifest file uses the latest JSON format rather than XML while also confirming that the Google Cloud project is correctly configured. I verified that the OAuth consent screen was properly set up in the Cloud Console and that the Gmail API had been enabled. It was important to ensure that the add-on’s defined scopes aligned with those in the manifest. When testing, I added myself as a test user and deployed the add-on as a test version before publishing. I also made sure to implement the necessary Apps Script functions referenced in the manifest. Reviewing Google’s deployment checklist helped me confirm that I hadn’t overlooked any critical steps.

I’ve been through this frustrating process recently, so I feel your pain. One key thing I discovered is that the spec file format has indeed changed significantly. The XML structure you’re using is outdated.

Instead, you need to use a JSON-based manifest file now. Here’s a basic structure to get you started:

{
  "name": "Your Add-on Name",
  "version": "1.0",
  "manifestVersion": 2,
  "requirements": {
    "apps": {
      "gmail": {
        "supportedScopes": [
          "https://www.googleapis.com/auth/gmail.addons.execute"
        ]
      }
    }
  },
  "gmail": {
    "contextualTriggers": [
      {
        "unconditional": {},
        "onTriggerFunction": "onGmailMessage"
      }
    ]
  }
}

Make sure you’ve also set up a Google Cloud project correctly and enabled the necessary APIs. The Google Workspace Marketplace SDK should be configured there too.

If it’s still not showing up, double-check your OAuth consent screen settings and make sure you’ve added test users if you’re in testing mode. Hope this helps point you in the right direction!

hey man, i feel ur pain. ive been there too. one thing that helped me was switching to the new JSON format for the manifest file. Its totally different from the XML you’re using. Also, make sure youve set up your Google Cloud project right and enabled the right APIs. oh, and dont forget to add yourself as a test user if youre still in testing mode. good luck!