workflow recipe

n8n OpenAI Email Summary Workflow for Gmail Triage

Use Gmail to collect a narrow set of messages, Set or Code to clean the fields, OpenAI to summarize, and Slack or Gmail to deliver a concise digest.

Independent third-party notes. n8n is a trademark of its owner and is referenced only for compatibility and troubleshooting context.

Quick Answer

Use Gmail to collect a narrow set of messages, Set or Code to clean the fields, OpenAI to summarize, and Slack or Gmail to deliver a concise digest.

Problem Pattern

AI email summary workflows can leak too much content, summarize the wrong messages, or fail when prompts receive messy HTML and long threads.

Key Facts

Input control
Summarize only messages that match a specific label, query, or schedule window.
Prompt control
Use short, structured fields rather than raw email HTML when possible.
Output control
Send a digest to Slack, email, or a sheet depending on the team's workflow.
Privacy control
Avoid processing sensitive messages unless the data policy allows it.

Recommended Steps

  1. Define the Gmail label or query that marks messages safe for summarization.
  2. Extract only the fields needed for context: sender, subject, snippet, date, and selected body text.
  3. Use OpenAI with a compact instruction that asks for action items, urgency, and a one-sentence summary.
  4. Format the summary with Set before sending it to Slack, Gmail, or a sheet.
  5. Test with short, long, and noisy email threads before enabling the schedule.

Verification

  • Only labeled or query-matched emails enter the workflow.
  • The prompt receives clean text and useful metadata.
  • The output summary includes sender, topic, urgency, and action items.
  • Sensitive fields are excluded from the final digest.

Warnings

  • Do not summarize private or regulated emails without a clear data policy.
  • Raw HTML and long threads can produce poor summaries unless cleaned first.
  • Model output should be treated as a draft, not a guaranteed factual record.

Best For

  • Daily inbox triage
  • Lead or support email summaries
  • Small teams that need a digest before deeper review

Not For

  • Legal, medical, or regulated email processing without review
  • Workflows that require guaranteed extraction accuracy without human checks

Common Mistakes

  • Running the workflow over the entire inbox.
  • Sending raw email HTML into the prompt.
  • Forgetting to label safe messages before summarization.
  • Treating model output as a final decision rather than a triage aid.

Examples

Daily digest flow Keep the input narrow and the output easy to scan.
Schedule Trigger: every weekday morning
Gmail: find messages labeled summarize
Set: sender, subject, date, snippet, cleaned_text
OpenAI: summarize action items and urgency
Slack: post digest to team channel

FAQ

Can this summarize all unread email?

It can, but that is usually too broad. A label or query keeps privacy, noise, and cost easier to control.

Why are summaries vague?

The input may be mostly HTML, quoted thread text, or missing key context. Clean the text and pass structured metadata.

Sources