Mindket

Summarize unread Gmail by date

Newversion 1 · updated

Overview

A small n8n tool workflow that another workflow or an AI agent calls with a request such as unread emails from yesterday. OpenAI works out the date, Gmail fetches up to ten unread inbox emails since then, and OpenAI summarizes each one.

Summarize unread Gmail by date 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.

Platform

Connects 2 apps

How it works

Trigger

Call from another workflow

It starts when another workflow calls it, passing:

  • query: a request that names a day, such as unread emails from yesterday

Actions

  1. OpenAI (gpt-4o) turns the request and today’s date into one date
  2. Gmail fetches up to ten unread inbox emails received after it
  3. OpenAI summarizes each email with its sender, and Aggregate gathers the summaries
  4. A last step sets response for the caller

Result

A short summary of each unread email since that day, handed back to the caller

Integrations

What you need before you start.

OpenAI

Language model

Works out the date from the request, then summarizes each email with its sender.

NeedsOpenAI API key

Gmail

Email

Fetches up to ten unread inbox emails received after the date, in full.

NeedsGoogle sign-in for Gmail

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
6 steps, starting when another workflow calls it
AI
2 steps call an AI model: OpenAI and OpenAI1
Sign-ins
Signs in to: Gmail
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 5 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow is a tool for other workflows to call, and it only reads. Whatever calls it passes one input named query, a request that names a day. OpenAI (gpt-4o) reads it with today’s date and answers with one date. The Gmail node fetches up to ten emails that are in the inbox and unread, received after that date. A second OpenAI step summarizes each email with its sender, Aggregate gathers the summaries into one list, and the last node sets response. Six nodes in all.

Who it suits

People who want to ask an assistant what they missed, and builders of n8n agents that need an inbox tool for it. Skip it if you need every unread email or a folder other than the inbox. It stops at ten messages and filters on the inbox label.

Where to use it

Inside a larger workflow, as the target of an Execute Workflow node or as a tool an AI agent can call. Any n8n works, as long as a Gmail account can be authorized in it.

Setup

Get it saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Its author puts setup at about 10 minutes.

  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add an OpenAI credential with your key and select it in both OpenAI and OpenAI1.
  3. Add a Gmail credential, sign in with Google, and select it in Gmail.
  4. Open When Executed by Another Workflow and check the field’s name. The file has query followed by a stray line break, so delete the break and let it read exactly query.
  5. Run one test and open the input of Gmail: the date should be there (see Good to know).
  6. Save and publish it, then open the calling workflow and choose this one in its Execute Workflow node or tool.

The caller passes one field and gets one back:

{
  "query": "unread emails from yesterday"
}
{
  "response": "<the summaries, one for each email>"
}

How to use it

Ask in plain words and name a day. For today or yesterday the date step returns midnight UTC of that day, and with no day named it uses today. The Gmail filter means received after that moment, so a request for yesterday returns every unread inbox email from the start of yesterday until now, today’s included. Each summary starts with the sender’s name and then gives a short account of the plain-text body.

Example

A caller passes the request from the fence above. The date step answers with yesterday at 00:00:00Z, Gmail returns up to ten unread messages since then, and the caller gets one short summary for each, headed by who sent it.

For newcomers and experts

If you are new. A tool workflow runs only when another workflow calls it. Unread and inbox are Gmail labels, and the workflow filters on both, so a message you have already opened is not included. Nothing is marked read or changed.

For experts. Gmail runs getAll with a limit of 10, label IDs INBOX and UNREAD, and simplify turned off, which returns the full message that the summary step needs for the sender and the body. Both OpenAI nodes use gpt-4o. The date step is told to answer with ISO 8601 and nothing else. The filter reads $json.date and falls back to the current time when that is empty.

Good to know

Check the date reaches Gmail. The risks after that are the cap and the privacy of your inbox.

  • Date check: n8n’s OpenAI node usually returns a JSON answer under message.content, while the filter reads $json.date. If the date is not at the top level of Gmail’s input, the filter falls back to the moment of the run and finds nothing. Point receivedAfter at {{ $json.message.content.date }}
  • Field name: the stray line break in the trigger’s field name is in the file, so fix it before the first call
  • Cap: at most ten emails per call
  • Privacy: each email’s sender name and text go to OpenAI
  • Billing: one OpenAI request for the date, plus one per email
  • Credentials: the JSON holds none, and nothing from its author’s account

README and files

README

Summarize unread Gmail by date

An n8n workflow, and a tool for other workflows to call. Give it a request that names a day and it returns a short
summary of each unread inbox email since then.

What is inside

  • workflow.json: the workflow as n8n exports it, six nodes. It holds no credential.
  • README.md: these notes.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • An OpenAI API key.
  • A Gmail account you can authorize in n8n.
  • A workflow of yours that calls this one, such as an AI agent with a tool (below).

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add an OpenAI credential and select it in both OpenAI and OpenAI1.
  3. Add a Gmail credential (Google sign-in) and select it in Gmail.
  4. Open When Executed by Another Workflow. The file names its one field query followed by a stray line break.
    Delete the break so the name reads exactly query.
  5. Run one test with { "query": "unread emails from yesterday" } pinned on the trigger. Open the input of Gmail
    and look for the date (see Good to know).
  6. Save, then press Publish at the top of the canvas (or Shift+P).
  7. In the calling workflow, choose this one in an Execute Workflow node, or add it as a tool for your agent.

How a workflow calls it

| Direction | Field | What it holds |
|---|---|---|
| In | query | a request that names a day, such as unread emails from yesterday |
| Out | response | the summaries, gathered into one value, one for each email |

What it does with the request

  • OpenAI gets the request and the current date and answers with one date in ISO 8601, as {"date": ...}. Today and
    yesterday give midnight UTC of that day. A request with no day gives today.
  • Gmail fetches up to 10 messages with the labels INBOX and UNREAD received after that date, with simplify off so the
    whole message is returned.
  • OpenAI1 writes a short summary of each one, headed by the sender's name.
  • Aggregate gathers the summaries and Edit Fields puts them in response.

Change it

  • Folder, count or day: the label IDs, Limit and Received After of Gmail.
  • How a date is read: the system message in OpenAI.
  • How a summary reads: the message in OpenAI1.

Good to know

  • Received after means after the start of that day, not only on it. A request for yesterday includes today's unread
    mail too.
  • n8n's OpenAI node usually returns a JSON answer under message.content, while the filter in Gmail reads
    $json.date. If the date is not at the top level of the Gmail node's input, the filter falls back to the moment of
    the run and finds nothing. Point Received After at {{ $json.message.content.date }}.
  • At most ten emails come back per call.
  • Each email's sender name and text are sent to OpenAI.
  • The workflow only reads. It marks nothing as read and changes no label.
Files
README.md  3 KB
workflow.json  5 KB

2 files, 8 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-03

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Nanosaur2-670M

well9472 · Kit

Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…

New

Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.

New

Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.

New

Similar in Productivity

See all in Productivity

Generates short 480P videos from a text prompt with the small 1.3B Wan2.1 model, packaged for the diffusers library. Runs on a consumer graphics card with abou…

New

Dulu Malayalam ASR

serendipitylabs · Kit

Turns spoken Malayalam into text on a CPU or a CUDA GPU, as an early research release from Serendipity Labs. For people who want draft transcripts of short, cl…

New

Turns plain home commands such as turn off the TV into structured tool calls, checking device states first. A 350M model for smart home builders and tinkerers.

New