Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
An n8n workflow that picks up new unread Gmail messages, asks GPT to label each as urgent, important, informational or spam with a one-line summary, and logs it in a Google Sheet. It moves and deletes nothing.
New Gmail emails sorted by AI and logged to Google Sheets is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.
New unread email
It starts when a new unread email reaches your Gmail, checked every minute. It brings:
A Google Sheet log with the date, sender, subject, category and a one-line summary of every new unread email, and no change to your mailbox
What you need before you start.
Mail source
Fetches new unread messages and parses them in full.
NeedsA Gmail OAuth2 credential
Language model
Labels each message and writes its summary. The copy asks for gpt-6-luna.
NeedsAn OpenAI API key
Spreadsheet
Appends one row for each message.
NeedsA Google Sheets OAuth2 credential and a tab with five named columns
Checked by Mindket on 13 Nov 2026
This n8n workflow sorts your new unread email and keeps a log of it. Every minute it picks up new unread messages in Gmail. A Code step keeps the sender, the subject, the date and the first 500 characters of the body. GPT labels each message as urgent, important, informational or spam and writes a one-sentence summary as JSON. A second Code step joins the answer to its email, and Google Sheets adds a row. Nothing is moved, labelled, deleted or answered. Five nodes run it, beside one sticky note.
Anyone with a busy inbox who wants to see how an AI would sort it before they let it act. Skip it if you want mail moved or labelled on its own. This one only logs. Each message goes to OpenAI.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Operations | Team leads | Check what an assistant would flag before they give it any power | A lead reads the log and sees which urgent mail the model caught. |
| Support | Shared inboxes | Measure how much of the inbox is spam or news | A support lead counts the categories after a week. |
| Sales | Account managers | Spot important mail among long threads | A manager filters the sheet for important and acts on those first. |
| Freelance | Independent workers | Get a daily list of what arrived | A freelancer reads one-line summaries instead of every message. |
You need to know n8n’s settings: import a file, add three credentials and name a sheet.
Any n8n that can reach Gmail, OpenAI and Google Sheets will run it.
Email log with five named columnsDownload saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup is three credentials and one sheet id.
| Need | Detail |
|---|---|
| n8n | On n8n Cloud or on a server of your own |
| Gmail | An OAuth2 credential for the mailbox to sort |
| OpenAI | An API key. The model is gpt-6-luna |
| Google Sheets | An OAuth2 credential and a tab called Email log with the columns Date, From, Subject, Category and Summary |
workflow.json.Gmail: New Email.AI: Classify.Log to Sheets. Replace <YOUR_SHEET_ID> with your sheet’s id.Leave it running and open the sheet when you want to see what came in. Read the first rows to judge whether the categories fit your mail, then change the prompt if they do not.
| To change | Where |
|---|---|
| Which mail is looked at | The filters in Gmail: New Email |
| The categories and the summary | The system message in AI: Classify |
| How much of the body the model sees | The length in Parse Email |
| The columns | The mapping in Log to Sheets, and row 1 of your tab |
A message arrives with the subject “Contract needs your signature today”.
{"category": "urgent", "summary": "A contract is waiting for your signature by the end of today."}The sheet gets a row with the date, the sender, the subject, the category urgent and that one-line summary.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one reads mail, asks a model to label it and writes a row. Start by sending yourself two or three test emails.
For experts. Two Code steps wrap one call to the model.
| Node | What it does | What to know |
|---|---|---|
Gmail: New Email | Trigger on unread mail, full parse | One item for each new message |
Parse Email | Keeps sender, subject, date and 500 characters | It handles every item of a check |
AI: Classify | OpenAI node with JSON output on | The answer comes back as an object |
Merge Result | Pairs each answer with its email | An unreadable answer becomes informational |
Log to Sheets | Appends the row | Row 1 must hold the five names |
The category is a guess, so read the first rows before you rely on them.
gpt-4o-mini shuts down on 14 January 2027, so this copy asks for gpt-6-luna and leaves out the temperature and the token limitDate, From, Subject, Category and Summary, or the sheet step stopsAn n8n workflow that sorts your new unread email and keeps a log. Every minute it picks up new unread messages in
Gmail. A model labels each one as urgent, important, informational or spam and writes a one-sentence summary. The result
goes into a Google Sheet. It is the safe first step: nothing is moved, deleted, labelled or answered.
workflow.json: the workflow as n8n exports it, six nodes. One is a sticky note. It holds no credential.README.md: these notes.n8n-nodes-base.openAi node at version 1.8. That node type only exists at versions 1 and 1.1, andAI: Classify is now n8n's OpenAI node, which has version 1.8, with its Message a Model operation andgpt-4o-mini, which OpenAI shuts down on 14 January 2027. It now asks for gpt-6-luna, the replacementParse Email handled only the first email of each check. When several emails arrive between two checks, the others wereMerge Result pairs each answer with its email.Merge Result expected the answer as text. The OpenAI node now returns it as an object, so the code takes either.<YOUR_SHEET_ID>. The tab is Email log, and the node lists its five columns.Email log. Row 1 holds these names: Date, From, Subject, Category andSummary. If one is missing, the sheet step stops.workflow.json.Gmail: New Email.AI: Classify.Log to Sheets. Replace <YOUR_SHEET_ID> with your sheet's id,/d/ and /edit.Gmail: New Email fetches new unread messages and parses them in full.Parse Email keeps the message id, the sender's address and name, the subject, the first 500 characters of the body andAI: Classify asks the model for JSON with a category and a summary. The category is urgent, important,Merge Result joins each answer with its email. If an answer cannot be read, the email is logged as informational withLog to Sheets appends a row to the Email log tab.Gmail: New Email.AI: Classify, and the fallback in Merge Result.substring length in Parse Email.Log to Sheets and row 1 of your tab.NOTICE.md 628 B README.md 4 KB workflow.json 6 KB
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
zarazhangrui · Skill
Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…
iptv-org · Kit
Collects publicly available live TV channels from many countries into playlists that any video player with live streaming can open. Made for viewers and for de…
uwg · Kit
Holds a set of image upscaling models gathered from the OpenModelDB community, for people who want to enlarge low-resolution pictures with AI on their own comp…