See llms.txt for all machine-readable content.

Back to Templates

Create quote drafts from customer emails with OpenAI, Gmail and Sheets

Quick overview

Local service businesses lose time typing the same quote replies. This workflow reads new Gmail inquiries, extracts what the customer wants and prepares a priced reply from your Google Sheets price list as a Gmail draft. Nothing is sent automatically.

How it works

  1. Gmail is checked every 5 minutes. Newsletters, auto-replies and no-reply senders are skipped; website forms with a Reply-To address are supported.
  2. OpenAI returns structured JSON: inquiry or not, service, quantity, location, preferred date and contact details. The output is validated. If the model fails or returns invalid JSON, a rule-based extraction takes over and the row is marked for review.
  3. Prices come only from your Google Sheets price list, including minimum charges. The model never sees prices, so it cannot invent them. Unknown services are listed as "to be confirmed".
  4. Every inquiry is logged in a Quotes register. Replies in a known thread update the existing row, repeated emails raise a duplicate counter, and attachment-only emails are logged for manual review.
  5. A Gmail draft is created in the customer's thread with the estimate and questions for any missing details. Nothing is sent automatically.
  6. If a node fails, you get an alert email naming the node and how to re-run the affected emails.

Setup

  1. Connect Gmail, Google Sheets and OpenAI.
  2. Create a sheet with the tabs Price list and Quotes using the header rows from the sticky note.
  3. Paste the sheet URL into the six Google Sheets nodes.
  4. Edit Quote settings (business name, reply texts, required details).
  5. Set your email in Email failure alert and select the workflow as its own error workflow.
    Send a test inquiry from another address and check the draft and the new row.
    The sticky notes on the canvas walk you through each step.

Requirements

  • Gmail, Google Sheets, an OpenAI API key. Built-in nodes only. Tested with n8n 1.97.1.

Additional info

Limitations: attachments are listed but not read. Drafts are placed in the Gmail thread, but n8n's Gmail node does not add an In-Reply-To header to drafts.