ReadyUpAgentsReadyUpAgents

n8n Gmail Trigger Not Working? Causes and Fixes

You built a workflow, tested the Gmail Trigger, and it pulled in an email just fine. Then real mail arrives and nothing happens. Or the opposite: the same email starts the workflow again and again. Both problems are common, and almost all of them come down to a handful of causes.

Here's how the Gmail Trigger works, then the checks we run, in order, when it misbehaves.

How the Gmail Trigger works

The Gmail Trigger doesn't get a push from Google when mail arrives. It polls: at the interval you set in Poll Times, it asks Gmail for messages received since its last check, then passes any new ones to the rest of the workflow.

Two details explain most confusion:

1. Check that the workflow is published

Production triggers only run on a live workflow. In n8n 2.0 and later, the old Active toggle was replaced by a Publish button. A workflow that has never been published won't poll at all.

Also, in newer versions, edits made after publishing stay in draft until you publish again. If the status says published but has changes, production is still running the older version. Publish again after any fix.

If the status shows a partial or failed publish, hover over it to see which trigger failed to start, usually because of a credential problem.

On older 1.x versions, the equivalent check is that the Active toggle is on.

2. Make sure n8n is running all the time

A polling trigger only works while your n8n instance is up. On n8n Cloud that's handled for you. If you self-host on a laptop or home machine, polls stop whenever it sleeps or shuts down. A small always-on server is the reliable option for anything you depend on.

3. Loosen your filters

A strict combination of filters can quietly exclude everything:

Recent versions of the trigger also skip drafts, mail you sent yourself that isn't in your inbox, and scheduled messages.

A quick test: copy your Search filter into the Gmail search bar. If Gmail finds no results, neither will n8n. Then remove filters one at a time until mail comes through, and add them back carefully.

4. Reconnect an expired Google credential

If the trigger worked for about a week and then stopped, an expired token is the most likely cause. This mostly affects self-hosted n8n, where you connect Gmail through your own Google Cloud OAuth client.

Google's documentation explains that when an OAuth consent screen uses the External user type with a publishing status of Testing, authorizations and refresh tokens expire seven days after consent. Changing your Google password can also end a token that includes Gmail scopes.

To fix it:

  1. Open the Gmail credential in n8n and reconnect it with Google.
  2. Publish the workflow again so the trigger restarts with the fresh credential.
  3. For a longer-term fix, review your consent screen settings in Google Cloud. If you use Google Workspace, an Internal app avoids the seven-day limit for users in your organization. Moving an External app to production comes with Google's own review requirements for Gmail scopes, so read their guidance before you change it.

A 401 "unauthorized_client" error usually means the Gmail API isn't enabled in your Google Cloud project, or the credential doesn't have the scopes it needs. Enable the Gmail API under APIs & Services, then reconnect. For the full setup, see our guide to n8n Gmail OAuth setup for self-hosted n8n.

5. Look for errors in the right place

In current versions, if a scheduled poll fails after the trigger has already started working, the error may be written to the n8n server logs instead of showing up as a failed execution. If you self-host and the trigger goes quiet with no errors in the Executions list, check your logs (for Docker, docker logs on your n8n container) for messages that mention the Gmail Trigger.

Also check your workflow settings: if successful production executions aren't saved, runs can happen without appearing in the list.

6. Stop the same email from running twice

Duplicates usually have one of three causes.

An older n8n version. n8n changed how the Gmail Trigger avoids duplicate emails in version 1.59.0, released in September 2024. If you're on something older, updating is the first step.

Nothing marks the email as handled. The Unread filter only helps if something marks the message as read. Add a Gmail node at the end of the workflow with the Message resource and the Mark as Read operation, using the message id from the trigger. Put it after the steps that do the real work, so a failure halfway through doesn't hide an email that was never processed.

If you'd rather leave mail unread for yourself, use a label instead. Add a label such as Processed at the end of the workflow, then add -label:processed to the trigger's Search filter so labeled mail is skipped.

Something else changes the email. Another workflow, a Gmail filter or a mail app can mark messages unread again. Make sure only one copy of the workflow is published.

Where a duplicate would cause real trouble, such as a second reply draft, keep a record of handled message IDs and skip any you've seen. A Data Table or the workflow's static data in a Code node both work.

7. Pick a sensible poll interval

Polling every minute adds API calls without much benefit. For most business inboxes, every five to ten minutes is plenty.

The Max Emails per Poll setting defaults to 10 and goes up to 50. Extra emails are queued for the next poll, so a big batch can take several cycles. That's expected, not a fault.

Start from a tested workflow

If you'd rather start from a tested workflow, we offer n8n templates for Gmail. Inbox Triage Lite is free on Gumroad and in the n8n template gallery. It sorts new mail into a few labels with OpenAI. AI Inbox Triage ($29, on Gumroad) adds more categories and saves reply drafts in Gmail for you to review and send yourself.

Both run on your own n8n with your own OpenAI key. OpenAI usage is billed by OpenAI and is usually small for sorting email, though it depends on your volume and model. Setup takes about 20 to 30 minutes, and paid templates include a 14-day refund window.

n8n is a trademark of n8n GmbH. ReadyUpAgents is independent and not affiliated with or endorsed by n8n.