How to Build an n8n Workflow That Summarizes New Emails with AI
Trigger on incoming Gmail messages, summarize each one with an LLM, and post the digest to a channel so you stop reading low-value email in full.
Most email does not need to be read end to end, it needs a two-line summary so you can decide whether to act. This workflow watches your inbox, asks an LLM to condense each new message, and sends you a short digest. It is the classic first real AI automation and teaches the trigger, transform, deliver pattern you will reuse constantly.
What you need
- A running n8n instance with an OpenAI credential already added
- A Gmail account and a Gmail OAuth2 credential in n8n
- A destination such as Slack or Telegram (this guide uses Slack)
Step 1: Add the Gmail Trigger
Drag in a Gmail Trigger node. Set Event to Message Received and Poll Times to every minute (or a longer interval to save quota). Optionally add a filter such as a label so you only summarize a subset of mail rather than the whole inbox.
Step 2: Summarize the body with an OpenAI node
Add an OpenAI node set to Message a Model. Use gpt-4o-mini for cost, and write a system style instruction plus the email body pulled from the trigger via an expression.
Summarize the email below in 2 sentences, then add a single line
"Action needed: yes/no".
Subject: {{ $json.subject }}
From: {{ $json.from.value[0].address }}
{{ $json.text }}Step 3: Send the summary to Slack
Add a Slack node set to Send a Message. Pick the target channel and build the message text from the original subject plus the AI summary returned by the previous node.
New email: {{ $('Gmail Trigger').item.json.subject }}
{{ $json.message.content }}Step 4: Test with one real message
Send yourself a test email that matches your filter, then click Execute Workflow. Watch each node light up green and confirm the summary lands in Slack. Once it works, toggle the workflow to Active so the trigger runs on its own.
Result
New email on the watched label now arrives in Slack as a two-sentence summary with an action flag. You skim the channel instead of opening every message, and you only jump into Gmail when the action flag says yes.
Watch related tutorials
32:08
21:45
34:10
26:40
32:15
40:20