AutomationFlowsEmail & Gmail › Gmail Email Summarizer via Webhook

Gmail Email Summarizer via Webhook

Original n8n title: Gmail Summarize

Gmail Summarize. Uses gmail. Webhook trigger; 4 nodes.

Webhook trigger★★★★☆ complexity4 nodesGmail
Email & Gmail Trigger: Webhook Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Gmail Summarize",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "gmail-summarize",
        "responseMode": "responseNode",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "message",
        "operation": "getAll",
        "returnAll": false,
        "limit": "={{ $json.max_results || 10 }}",
        "options": {
          "q": "={{ $json.query || 'is:unread' }}"
        }
      },
      "name": "Gmail Get Messages",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        450,
        300
      ],
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// Process and summarize emails\nconst emails = items.map(item => ({\n  id: item.json.id,\n  from: item.json.payload.headers.find(h => h.name === 'From')?.value || 'Unknown',\n  subject: item.json.payload.headers.find(h => h.name === 'Subject')?.value || 'No Subject',\n  snippet: item.json.snippet || '',\n  date: item.json.payload.headers.find(h => h.name === 'Date')?.value || ''\n}));\n\nconst summary = {\n  total: emails.length,\n  emails: emails.slice(0, 5),\n  text_summary: `You have ${emails.length} email(s). ${emails.slice(0, 3).map((e, i) => `${i+1}. From ${e.from.split('<')[0].trim()}: ${e.subject}`).join('. ')}`\n};\n\nreturn [{ json: summary }];"
      },
      "name": "Summarize Emails",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}"
      },
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Gmail Get Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Get Messages": {
      "main": [
        [
          {
            "node": "Summarize Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Emails": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Gmail Summarize. Uses gmail. Webhook trigger; 4 nodes.

Source: https://github.com/ankitkr9911/Nexus-Labs/blob/bec9e0c5c12dee6aaff3dc67219f5d9154b8845c/n8n-workflows/gmail-summarize.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

Receive booking requests via webhook with automatic validation, duplicate detection, availability checking, confirmation emails, Google Calendar sync, and Slack notifications.

HTTP Request, Gmail, Google Calendar +2
Email & Gmail

This template is designed for freelancers, small businesses, and finance teams who need automated invoice management with intelligent payment follow-ups. Perfect for service providers, agencies, or an

Google Sheets, Gmail, Slack
Email & Gmail

Automate short-term trading research by generating high-quality trade ideas using MCP (Market Context Protocol) signals and AI-powered analysis. 📈🤖 This workflow evaluates market context, catalysts, m

Slack, Asana, HTTP Request +4
Email & Gmail

A complete, production-ready newsletter automation workflow that validates email addresses, sends personalized welcome emails, and maintains comprehensive logs in Google Sheets. Perfect for marketing

Google Sheets, Gmail, N8N Nodes Verifiemail
Email & Gmail

Who’s it for

Google Calendar, Zoom, Gmail +1