---
title: "Summarize unread Gmail by date"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/321b84b9-3a26-468e-ab6a-014bcbfe8a37"
updated: "2026-11-09"
---

# Summarize unread Gmail by date

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-09. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## 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.

### How to set it up

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:

```json
{
  "query": "unread emails from yesterday"
}
```

```json
{
  "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

```markdown
# 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.
```

## What is in it

2 files, 8 KB, downloaded as a zip.

```text
README.md  3 KB
workflow.json  5 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- 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

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/321b84b9-3a26-468e-ab6a-014bcbfe8a37)
- [Its page on Mindket](https://mindket.com/p/321b84b9-3a26-468e-ab6a-014bcbfe8a37)
