Gmail add-on contextual trigger function not executing when composing emails

I’m working on a Gmail extension that should automatically insert email signatures when users start writing a new message. The problem is that our contextual trigger isn’t firing at all.

We expected the trigger to activate when someone clicks the compose button, but nothing happens. I’ve tried placing the gmail configuration both at the top level of our manifest and inside the addOns section, but neither approach works.

Here’s our current manifest setup:

"gmail": {
  "contextualTriggers": [
    {
      "unconditional": {},
      "onTriggerFunction": "addSignatureFunction"
    }
  ]
}

Has anyone encountered this issue before? What could be preventing the contextual trigger from being called?

same issue here! check if your add-on is properly installed and granted permissions. sometimes just refreshing or reinstalling helps too. also, verify the function is publicly accessible if you’re running it from a library.

Had the same issue last month. Problem was my function declaration. Check that your addSignatureFunction exports properly and returns the card structure Gmail wants. Also verify you’ve got the right scopes in your manifest - Gmail add-ons need specific authorization scopes for compose access. One thing that tripped me up: after changing contextual triggers, Google’s servers can take a few minutes to pick up the updates, even in test mode.

Check your manifest version and make sure the structure matches your setup. I had the same problem and discovered that contextual triggers need different placement depending on whether you’re building a standalone add-on or tweaking an existing Google Workspace one. If you’re integrating into an existing add-on, put the gmail configuration inside the addOns section, not at the root level. Also double-check that your trigger function exists and you spelled it right - I wasted hours debugging because of a typo in the function name. The unconditional trigger should work fine for compose scenarios, just make sure your add-on is published to your domain or you’ve got developer mode enabled for local testing.

Been there, done that. Gmail add-ons are a pain to debug and maintain.

Skip Google’s contextual triggers entirely - automate the whole workflow instead. Set up a system that watches for compose events and handles signature insertion automatically. No more dealing with Gmail’s finicky add-on architecture.

I built something like this for our team. It monitors compose events and injects signatures based on user profiles, departments, whatever rules you need. Way more reliable than hoping Gmail’s triggers work.

Bonus: you can extend it for other email automation - templates, auto-responses, formatting. All without touching Google’s add-on system.

Latenode handles Gmail integration really well for this kind of workflow automation. No more debugging manifest files: https://latenode.com