Templates / Send a ChatGPT email reply and save responses to Google Sheets

Send a ChatGPT email reply and save responses to Google Sheets

Needs changes

by n8n Team ✓ · 19,117 views · created 2023-03-10 · Ticket Management, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: OpenAI (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 40 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail and Google Sheets.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Identify trigger # (Edit Fields (Set)): sets or maps fields
  2. Identify trigger # (Edit Fields (Set)): sets or maps fields
  3. Configure (Edit Fields (Set)): sets or maps fields
  4. Determine which trigger ran (Switch): routes items into 2 branches
  5. Only continue for specific emails (If): checks a condition and branches into true / false
  6. Generate UUID (Crypto): hashes or encrypts values
  7. Thanks for your response! (HTML): parses or builds HTML
  8. Extract message content (advanced) (Code): runs custom JavaScript code
  9. Show HTML page (Respond to Webhook): sends the response back to the webhook caller
  10. Is text within token limit? (If): checks a condition and branches into true / false

…plus 20 more steps. See the full node list below.

Services it uses

GmailGoogle Sheets

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • OpenAI (legacy) in Generate reply: replace with OpenAI node (AI section).
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Removed in 3.0Replace with
OpenAI (legacy)
Generate reply
OpenAI node (AI section)

Nodes used (13)

From the author

This workflow sends a OpenAI GPT reply when an email is received from specific email recipients. It then saves the initial email and the GPT response to an automatically generated Google spreadsheet. Subsequent GPT responses will be added to the same…

Excerpt from n8n Team's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.