Mindket

AI email replies from Gmail with feedback saved to Sheets

Newversion 1 · updated

Overview

An n8n workflow that replies to listed Gmail senders with OpenAI and saves each exchange, plus a Yes or No rating, to Google Sheets.

AI email replies from Gmail with feedback saved to Sheets is an n8n workflow in the Business 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.

At a glance

Runs in
  • Gmail: the mail that is answered
  • OpenAI: the model that writes the replies
  • Google Sheets: the log of messages, replies and ratings
  • Your n8n: the Yes and No links lead back to it

Platform

Connects 3 apps

How it works

Trigger

New Gmail message

It starts when Gmail, checked every minute, shows a new message:

  • The recipients list, set in Configure
  • The token limits for the message and the reply, set in Configure
  • The spreadsheet and tab names, set in Configure

Actions

  1. The sender is checked against the list, and the newest text of the message is kept
  2. A message too long for the token limit is ignored
  3. OpenAI writes a reply, and a reply that ended on the limit is not sent
  4. Gmail answers in the same thread, with a Yes and a No link at the end
  5. The message and the reply are added to a Google Sheet, which is created if it is missing
  6. A click on Yes or No calls a webhook, which writes the answer into the row of that reply

Result

A reply in the sender’s thread, and a row in the sheet with the message, the reply and the rating

Integrations

What you need before you start.

Gmail

Mailbox

Supplies new messages and sends each reply in its thread.

NeedsA Gmail credential

OpenAI

Language model

Writes the reply from the sender, subject and text of the message.

NeedsAn OpenAI API key

Google Sheets

Reply log

Stores each message and reply, and receives the Yes or No rating.

NeedsA Google Sheets credential

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
41 steps, starting on a Gmail event or when its webhook is called
AI
No step calls an AI model
Sign-ins
Signs in to: OpenAI, Gmail and Google Sheets
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 13 of its step types

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

About

What it is

This n8n workflow answers new Gmail messages with replies written by OpenAI. It answers only the senders you list, or everyone if you use a star. Each reply carries a Yes and a No link, and the message, the reply and the click are saved to a Google Sheet. Forty-one nodes run it, beside nine sticky notes.

Who it suits

Small teams that want a first reply drafted and sent for routine mail, and want rated examples to improve a model later. Skip it if a person must read every reply first, or if the mail cannot go to OpenAI.

Who uses it, and how
IndustryWho uses itHow they use itExample
SupportSupport desksAnswer routine questions from known addressesA desk sends first replies to a partner’s repeat questions.
SalesSales teamsReply to inbound enquiriesA rep’s mailbox answers a pricing enquiry on its own.
RecruitingRecruitersAcknowledge applicationsA recruiter’s inbox thanks each applicant and says what happens next.
ResearchAI teamsCollect rated repliesA team gathers Yes and No ratings for later fine-tuning.

You need some n8n and a Google account: import a file, add three credentials, list who to answer and set the WEBHOOK_URL variable.

Where to use it

An n8n that can reach Gmail, OpenAI and Google Sheets will run it. The replies leave from your Gmail account, and the rating pages are served by your n8n.

  • Gmail: the mail that is answered
  • OpenAI: the model that writes the replies
  • Google Sheets: the log of messages, replies and ratings
  • Your n8n: the Yes and No links lead back to it

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup takes three credentials, a list of senders and the WEBHOOK_URL variable.

What you need first
NeedDetail
n8nAn instance with WEBHOOK_URL set to the address people reach it at
GmailA Google account for the mailbox
Google SheetsThe same account, or your own sheet with four columns
OpenAIAn API key
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add credentials for Gmail, Google Sheets and OpenAI, and select them in the nodes that ask for one.
  3. In Configure, replace <YOUR_RECIPIENT_EMAILS> with the addresses to answer, or with a star for every sender.
  4. Leave the sheet ids empty to let the workflow create a spreadsheet, or fill in your own.
  5. Activate the workflow and send a test mail from a listed address.

How to use it

Activate the workflow. Gmail is checked every minute, and a message from a listed sender gets an answer in the same thread. A click on Yes or No in the reply updates the sheet.

What to change for a different result
To changeWhere
The model and the promptThe body of Generate reply
The reply lengthreplyTokenSize in Configure
Who gets an answerrecipients in Configure
The look of the replyThe HTML in Email template

Example

A partner writes twice a week to ask how to reset a device, and the address is on the list. The workflow writes a short reply and sends it in the thread.

It then adds a row to the sheet with the first message and the reply. The partner clicks Yes, and the last column of that row changes to Yes.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here one trigger watches Gmail, and a second waits for a click on a link in the reply. Start with your own address as the only sender.

For experts. Two triggers share one chain of Set, Switch and Configure nodes. The reply comes from one HTTP Request to Chat Completions, and a Code node keeps only the newest text of each message.

Where to look closer
NodeWhat it doesWhat to know
Extract message content (advanced)Cuts quoted older mail from the messageThe parser is long minified code, left as it was
Generate replyAsks Chat Completions for the replyThe reasoning effort is none, so the length limit covers visible text only
Reply FieldsPicks text and finish_reasonA reply that did not end on stop is not sent
Create or update rowsAdds the row, or reports a missing sheetcontinueOnFail lets the next check see the error

Good to know

This workflow sends real replies to every matching sender, so try it with your own address first.

  • The repair: n8n’s older OpenAI text node used its default model, gpt-3.5-turbo-instruct. OpenAI’s deprecations page, read on 12 November 2026, lists it as shut down on 28 September 2026. This copy calls Chat Completions with gpt-6-luna
  • Length: reasoning tokens count toward max_completion_tokens, so the request switches reasoning off and the default of 300 leaves room for text
  • The links: the Yes and No links come from WEBHOOK_URL, and anyone who holds one can click it
  • The limit: maxTokenSize is 4000, and the model page lists a context of 1,050,000 tokens, so you can raise it
  • Not run: this copy was not run against Gmail, Google Sheets or OpenAI
  • Your data: each email goes to OpenAI, and the sheet keeps messages and replies
  • Credentials: the JSON holds none

README and files

README

AI email replies from Gmail with feedback saved to Sheets

An n8n workflow that answers new Gmail messages from the senders you list with a reply written by OpenAI. It saves each message and its reply to a Google Sheet. Every reply carries a Yes and a No link, and a click writes the answer into the sheet, so you collect rated examples for fine-tuning later.

What is inside

  • workflow.json: the workflow as n8n exports it, fifty nodes: forty-one that do the work and nine sticky notes. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The credential links are gone. Select your own for Gmail, Google Sheets and OpenAI.
  • Generate reply was n8n's older OpenAI text node. The file names no model, so the node used its default, gpt-3.5-turbo-instruct. OpenAI's deprecations page, read on 12 November 2026, lists that model as shut down on 28 September 2026 with gpt-5.6-terra as the replacement. The model page for gpt-5.6-terra shows the legacy Completions endpoint as not supported.
  • Generate reply is now an HTTP Request to Chat Completions. It names gpt-6-luna, sets reasoning_effort to none and takes max_completion_tokens from replyTokenSize. OpenAI's reference counts reasoning tokens in that limit, so the default of 300 could run out before any text appears with reasoning switched on.
  • A new Reply Fields node follows it. It turns the answer into text and finish_reason, the two fields the rest of the workflow reads, and Format data reads text from it.
  • The first line of the email parser Code node was a comment with its author's link. That line is removed and the parser is as it was.
  • recipients held [UPDATE ME]. It holds <YOUR_RECIPIENT_EMAILS> now.
  • The notes are rewritten. One of them named Pipedrive, which belongs to another workflow.
  • Nothing else.

Before you start

  • An n8n instance with the WEBHOOK_URL environment variable set to the address people reach it at. The Yes and No links in each reply are built from it. n8n's security page lists N8N_BLOCK_ENV_ACCESS_IN_NODE as false by default, which leaves that access on.
  • A Gmail account, a Google account for Sheets, and an OpenAI API key.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Gmail credential and select it in On email received and Send reply to recipient.
  3. Add a Google Sheets credential and select it in Create spreadsheet, Create or update rows, Paste data and Send feedback for fine-tuned data.
  4. Add an OpenAI credential and select it in Generate reply.
  5. In Configure, replace <YOUR_RECIPIENT_EMAILS> with the addresses to answer, separated by commas, or with * to answer every sender.
  6. Leave spreadsheetId and worksheetId empty and the workflow creates a spreadsheet named by spreadsheetName. To use your own sheet, fill both in and give it the columns ID, Initial message, Generated reply and Good response?.
  7. Save and activate the workflow, then send a test message from a listed address.

How a run goes

  1. On email received polls Gmail every minute. Identify trigger #1 marks the item as gmail and Configure adds the settings.
  2. Determine which trigger ran sends it on. Only continue for specific emails checks the sender against recipients.
  3. Generate UUID gives the exchange an id. Extract message content (advanced) keeps the newest text of the message and drops quoted older mail.
  4. Is text within token limit? compares the text length divided by four with maxTokenSize minus replyTokenSize. A longer message is ignored.
  5. Generate reply asks OpenAI, and Reply Fields picks out the answer. If reply is complete lets only a reply that ended on stop through to Email template, and Send reply to recipient answers the message in its thread.
  6. Format data builds a row with the id, the first message, the reply and an empty Good response?. The sheet nodes create the spreadsheet if it is missing, or add the row to it.
  7. On feedback given is a webhook. A click on Yes or No sends the id and the answer. Identify trigger #2 marks it webhook, Record feedback passes it on and Send feedback for fine-tuned data writes the answer into the row with that id. The visitor sees a thank-you page.

Change the look

  • The model and the prompt: the body of Generate reply.
  • The reply length: replyTokenSize in Configure.
  • Who gets an answer: recipients in Configure.
  • The look of the reply: the HTML in Email template.
  • The names of the spreadsheet and the tab: Configure.

Good to know

  • The workflow sends real replies to every matching sender. Test with your own address first.
  • A reply that stops at the length limit is not sent. Raise replyTokenSize if that happens.
  • maxTokenSize is 4000, a cautious number. The model page for gpt-6-luna lists a context of 1,050,000 tokens, so you can raise it.
  • The spreadsheet id is kept in the workflow's static data. Copy the workflow into a new one to refresh it.
  • Anyone who has a feedback link can click it, and the link carries the exchange id.
  • This copy was not run against Gmail, Google Sheets or OpenAI.
  • The text of each email goes to OpenAI, and the sheet keeps messages and replies.
  • The JSON holds no credential.
Files
NOTICE.md  673 B
README.md  5 KB
workflow.json  79 KB

3 files, 85 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

DeepSeek-R1-GGUF

unsloth · Kit

GGUF copies of the 671B DeepSeek-R1 reasoning model, with 1.58-bit and 2-bit dynamic quants, for running it in llama.cpp on a local machine with enough memory.

New

Axion-1.0-35B-GGUF

prithivMLmods · Kit

Provides GGUF files of Axion-1.0-35B, a 35B mixture-of-experts model with about 3B active parameters aimed at scientific reasoning, information seeking and too…

New

HEART

Phips · Kit

Upscales low-resolution images with a super-resolution network that trains on one consumer GPU and exports to ONNX. For people who train or run image upscalers.

New

Similar in Business

See all in Business

pplx-decider-v1.1-27b

perplexity-ai · Kit

Picks the best option for a decision from text and images, such as which team should handle a request, with a probability for each choice, for developers who b…

New

NuExtract3

numind · Kit

Reads documents as text or images and fills a JSON template with the fields you ask for, or converts the pages to Markdown. A 4B model for teams that process s…

New

Drex DLM

nace-ai · Kit

Scores yes or no, multiple choice and rating questions about a document in one pass, with a probability for every option. An 8B decision model from Nace.AI tha…

New