AutomationFlowsAI & RAG › Send Ai-summarized Unread Email Alerts to Slack Using Gpt-4o and Gmail

Send Ai-summarized Unread Email Alerts to Slack Using Gpt-4o and Gmail

ByMatt Chong | n8n Creator @mattxchong on n8n.io

If you’re overwhelmed with incoming emails but only want to be notified about the essentials, this workflow is for you. Perfect for busy professionals who want a short AI summary of new emails delivered directly to Slack.

Event trigger★★★☆☆ complexityAI-powered10 nodesGmail TriggerGmailAgentOpenAI ChatOutput Parser StructuredSlack
AI & RAG Trigger: Event Nodes: 10 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7622 — we link there as the canonical source.

This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.

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 to Slack: AI Summarized Email Alerts",
  "nodes": [
    {
      "name": "Trigger on Unread Email",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "filters": {
          "readStatus": "unread"
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "name": "Get Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        224,
        0
      ],
      "parameters": {
        "simple": false,
        "options": {},
        "messageId": "={{ $json.id }}",
        "operation": "get"
      },
      "typeVersion": 2.1
    },
    {
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        448,
        0
      ],
      "parameters": {
        "text": "=You are an assistant that summarises emails. \nSummarise the following email into a concise message (max 250 characters).\n\nYour output must be valid JSON with exactly two fields:\n- \"sender\": the sender\u2019s name\n- \"summary\": the 250-character summary\n\nHere is the required output format:\n{\n  \"sender\": \"Example Sender\",\n  \"summary\": \"Example summary of the email, no more than 250 characters.\"\n}\n\nEmail content:\n{{ $json[\"text\"] }}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        464,
        224
      ],
      "parameters": {
        "model": {
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        592,
        224
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"sender\": {\n      \"type\": \"string\",\n      \"description\": \"The sender\u2019s name from the email\"\n    },\n    \"summary\": {\n      \"type\": \"string\",\n      \"maxLength\": 250,\n      \"description\": \"A concise summary of the email content\"\n    }\n  },\n  \"required\": [\"sender\", \"summary\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "name": "Send Notification to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        800,
        0
      ],
      "parameters": {
        "text": "={{ $json.output.sender }}: {{ $json.output.summary }}",
        "select": "user",
        "otherOptions": {
          "includeLinkToWorkflow": false
        },
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        304
      ],
      "parameters": {
        "width": 272,
        "height": 128,
        "content": "### \ud83d\udee0\ufe0f Connect Credentials First\nEnsure Gmail, Slack, and OpenAI are connected before activating the workflow."
      },
      "typeVersion": 1
    },
    {
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 304,
        "content": "### \ud83d\udd01 Adjust Frequency\nYou can modify how often the workflow checks for new emails in the Gmail Trigger node"
      },
      "typeVersion": 1
    },
    {
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 336,
        "height": 608,
        "content": "### \ud83e\uddea Tweak the AI Summary\n- Adjust the prompt in the AI Agent node to change the summary style. For example, include action items, highlight urgency, or support longer summaries.\n- Remove or update the 250-character limit in the prompt if you want more detailed outputs."
      },
      "typeVersion": 1
    },
    {
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 608,
        "content": "### \ud83d\udce3 Slack Notification Tips\n\u2022 Customize Slack message format in the Send Notification to Slack node. Select the receiver. \n\u2022 You can include emojis, prefixes (e.g., \u201c\ud83d\udcec New Email\u201d), or sender-based routing if needed."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Notification to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "ai_outputParser": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ],
      "ai_languageModel": [
        [
          {
            "node": "OpenAI Chat Model",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger on Unread Email": {
      "main": [
        [
          {
            "node": "Get Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

If you’re overwhelmed with incoming emails but only want to be notified about the essentials, this workflow is for you. Perfect for busy professionals who want a short AI summary of new emails delivered directly to Slack.

Source: https://n8n.io/workflows/7622/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Monitors your AP inbox for incoming invoices, extracts structured data with AI, runs duplicate and vendor history checks against Supabase, then scores each invoice for fraud risk — routing suspicious

Gmail Trigger, Agent, OpenAI Chat +4
AI & RAG

Gmail users report spending significant time manually sorting email, so this tool helps alleviate that burden. Gmail Trigger monitors unread emails every 2 minutes Once an email arrives, the content i

OpenAI Chat, Output Parser Structured, Agent +4
AI & RAG

Email-Triage. Uses lmChatOpenAi, outputParserStructured, agent, toolWorkflow. Event-driven trigger; 27 nodes.

OpenAI Chat, Output Parser Structured, Agent +5
AI & RAG

[](https://youtu.be/nC2mSry3xFo)

Gmail Trigger, OpenAI Chat, Output Parser Structured +6
AI & RAG

Streamline your HR recruitment process with this intelligent automation that reads candidate emails and resumes, analyzes them using GPT-4, and automatically shortlists or rejects applicants based on

Gmail, Gmail Trigger, HTTP Request +7