Draft portal enquiry replies with OpenAI, Gmail and Google Sheets
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs on Gmail events. Along the way it connects Gmail and Google Sheets. It also calls api.openai.com over HTTP.
How it runs
Trigger: On Gmail events.
- Settings (Edit Fields (Set)): sets 9 fields: AGENCY_NAME, AGENT_NAME, BOOKING_LINK…
- AI instructions (Edit Fields (Set)): sets 2 fields: AI_MODEL, SYSTEM_PROMPT
- Prepare enquiry (Code): runs custom JavaScript code
- AI: draft reply (OpenAI) (HTTP Request): calls api.openai.com (POST)
- Check AI output (Code): runs custom JavaScript code
- Log lead (Google Sheets) (Google Sheets): append
- Draft for review? (If): checks a condition and branches into true / false
- Save draft for review (Gmail): create (draft)
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
HTTP calls to: api.openai.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail
From the author
Quick overview UK estate and letting agents (and any business) that receive enquiries from Rightmove, Zoopla, OnTheMarket or website forms by email and want a fast, accurate first reply without anything going out unchecked. How it works 1. Watches a Gmail…