Automations
6 min read

n8n GmailTrigger Workflow: Complete 2026 Guide to Automate Gmail (Free JSON Template)

Dev Shabbir
Dev Shabbir
February 25, 2026

n8n GmailTrigger Workflow: Complete 2026 Guide to Automate Gmail

The GmailTrigger node in n8n is one of the most powerful tools for automating email-driven workflows—without writing a single line of code. Whether you're a sales rep qualifying leads from inbound emails, a support agent routing tickets, or a marketer processing newsletter signups, this guide gives you everything you need to deploy, optimize, and troubleshoot GmailTrigger workflows in 2026.

In this comprehensive tutorial, you'll learn:

  • Exactly how GmailTrigger works (and how it differs from GmailTool)
  • Step-by-step setup with OAuth security best practices
  • Real-world B2B use cases like CRM lead ingestion
  • How to fix the 7 most common GmailTrigger failures
  • Where to download a ready-to-import JSON workflow template

What Is the n8n GmailTrigger Node?

The GmailTrigger is an event-driven trigger node in n8n that monitors your Gmail inbox for new messages. When a matching email arrives (based on filters like sender, subject, or label), it automatically executes your workflow.

Unlike the GmailTool node—which actively sends emails or reads mail via API calls—GmailTrigger is passive: it waits for incoming events. This makes it perfect for reactive automation such as:

  • Processing customer inquiries from a dedicated support@ email
  • Parsing job applications sent to careers@yourcompany.com
  • Triggering Slack alerts when high-priority clients email you

Key Features of GmailTrigger (2026 Update)

  • Real-time polling: Checks inbox every 1–5 minutes (configurable)
  • Filter support: Match by sender, subject line, hasAttachment, isUnread, etc.
  • OAuth 2.0 secure: No password storage—uses Google Workspace scopes
  • Self-hostable: Run on your own server for full data control

How to Set Up GmailTrigger in n8n (Step-by-Step)

Follow these steps to configure GmailTrigger securely and efficiently:

Step 1: Create a Google Cloud Project & Enable Gmail API

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Navigate to APIs & Services > Library
  4. Search for "Gmail API" and enable it
  5. Go to Credentials > Create Credentials > OAuth client ID
  6. Choose "Web application", add http://localhost:5678 as an authorized redirect URI (for local n8n testing)
  7. Copy your Client ID and Client Secret

Step 2: Configure n8n Gmail Credentials

  1. In your n8n instance, go to Credentials > Add Credential
  2. Select "Gmail OAuth2 API"
  3. Paste your Client ID and Client Secret
  4. Set scopes to: https://www.googleapis.com/auth/gmail.readonly (least privilege)
  5. Click "Connect My Google Account" and authorize

Step 3: Build Your First GmailTrigger Workflow

  1. Add a new workflow in n8n
  2. Drag in the GmailTrigger node
  3. Select your saved Gmail credential
  4. Configure filters (e.g., from:support@client.com or subject:"Urgent")
  5. Set polling interval (default: 5 minutes; reduce to 1 min for real-time needs)
  6. Add a NoOp node (for debugging) or connect to HTTP Request, Slack, or Google Sheets
  7. Activate the workflow
n8n GmailTrigger workflow with NoOp and Slack nodes
Sample workflow: GmailTrigger → NoOp (debug) → Slack notification

GmailTrigger vs. GmailTool: Which Should You Use?

Many users confuse these two nodes. Here’s the critical difference:

Feature GmailTrigger GmailTool
Trigger Type Event-based (passive) Action-based (active)
Use Case React to incoming emails Send emails, read drafts, modify labels
Auth Scope gmail.readonly gmail.send, gmail.modify
Workflow Role Start node only Can be used mid-workflow

Pro Tip: Use both together! Example: GmailTrigger detects a new lead email → GmailTool sends a confirmation reply.

Real-World B2B Use Case: Automate Lead Qualification

Imagine your sales team receives 50+ daily inquiries at leads@yourstartup.com. Manually copying each into your CRM wastes hours.

With n8n + GmailTrigger, you can:

  1. Trigger on emails with subject "Interested in Demo"
  2. Extract name, company, and phone using IFTTT-style regex or AI Parser node
  3. Push structured data to HubSpot, Salesforce, or Airtable
  4. Send a personalized Slack alert to your SDR
  5. Auto-reply with a Calendly link using GmailTool

This reduces lead response time from 24 hours to under 5 minutes—directly impacting conversion rates.

GmailTrigger Not Working? 7 Fixes for 2026

If your workflow isn’t triggering, try these solutions:

1. Check OAuth Scopes

Ensure your credential includes https://www.googleapis.com/auth/gmail.readonly. Missing scopes cause silent failures.

2. Verify Polling Interval

Default is 5 minutes. For testing, set to 1 minute. Note: Google may throttle excessive polling.

3. Confirm Email Filters

Test filters in Gmail first (e.g., from:john@example.com is:unread). Invalid syntax = no matches.

4. Disable "Mark as Read"

If isUnread is true but emails are auto-marked read by another app, the trigger won’t fire. Use labels instead.

5. Check n8n Execution Logs

Go to Executions tab. Look for errors like "403 Forbidden" (scope issue) or "No items found" (filter mismatch).

6. Restart n8n After Credential Changes

OAuth tokens are cached. Restart your n8n instance after updating credentials.

7. Avoid Gmail API Quotas

Free tier allows ~1,000 requests/minute. Monitor usage in Google Cloud Console under "Quotas".

Download Free n8n GmailTrigger JSON Template

Skip the setup hassle. Import this pre-built workflow that includes:

  • GmailTrigger with common filters
  • NoOp node for debugging
  • Wait node (5s delay example)
  • StickyNote with setup instructions
  • StopAndError node for failure handling
{
  "nodes": [
    {
      "parameters": {
        "filters": {
          "from": "",
          "subject": "Lead",
          "hasAttachment": false,
          "isUnread": true
        },
        "options": {
          "interval": 5
        }
      },
      "name": "GmailTrigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {},
      "name": "NoOp",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [450, 300]
    },
    {
      "parameters": {
        "duration": 5,
        "unit": "seconds"
      },
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [650, 300]
    }
  ],
  "connections": {
    "GmailTrigger": {
      "main": [[{ "node": "NoOp", "type": "main", "index": 0 }]]
    },
    "NoOp": {
      "main": [[{ "node": "Wait", "type": "main", "index": 0 }]]
    }
  }
}

Download JSON Template

Who Should Use n8n GmailTrigger?

  • SMBs: Automate customer onboarding without dev resources
  • Agencies: Offer white-label email automation as a service
  • Developers: Build custom integrations faster than with Zapier
  • Non-profits: Process donation emails and send tax receipts automatically

Pricing: Is n8n Free?

n8n is open-source and free to self-host. You only pay for infrastructure (e.g., AWS, DigitalOcean). For managed cloud hosting, plans start at $20/month (n8n Cloud). Compare to Zapier ($20/month for 750 tasks)—n8n offers unlimited executions on your own server.

When to Avoid GmailTrigger

GmailTrigger isn’t ideal if:

  • You need sub-second latency (use webhooks instead)
  • Processing >10,000 emails/day (consider Google Pub/Sub)
  • Your team lacks basic no-code literacy (invest in training first)

For most teams under 500 daily emails, GmailTrigger is the optimal balance of simplicity and power.