ChatGPTSalesFinding leadsAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Poll Google Sheets leads, generate GPT-4o-mini summary, and draft Gmail outreach in n8n

Input: new or updated rows in Google Sheets; Process: OpenAI generates company summary and automation value prop, Gmail creates draft; Output: Gmail draft + status written back to Sheets

Some experienceStepsWorkflowPrompt
Who
Sales ops or marketers who want low-code automation to process leads and generate personalized email drafts at scale
You get
Automatically detect new Sheets rows every minute, AI-generates a two-sentence company summary and value proposition, creates a Gmail draft, and writes the summary and status back to Sheets
You need
n8n · gmail · google-sheets

Constraints

Prerequisites: an n8n instance (self-hosted or Cloud); valid credentials for Google Sheets, OpenAI, and Gmail; a sheet with columns FirstName, Company, Industry, Status, and AI Summary. Costs: OpenAI API usage billed by token; Gmail/Sheets typically within free tiers.

What they did

Author twonjee2002 published this workflow as an n8n official template. It demonstrates a four-node automation: Google Sheets Trigger polls every minute → OpenAI node analyzes Company and Industry with gpt-4o-mini → Gmail node creates a draft email → Google Sheets node writes the AI Summary and "Draft Created" status back to the original row. Three Sticky Notes explain the overall flow, the left-side capture/analyze cluster, and the right-side draft/update cluster.

How it went

Author report: published as an n8n official template with 22 views. No specific conversion rate or ROI data provided.

Worth knowing

1. The email body template ends with a hard-coded signature "Adetunji"; replace it with your own name before use. 2. The trigger uses polling (everyMinute) rather than instant webhook, which may cause delays and API quota usage for high-frequency updates. 3. The Sheets Update node uses defineBelow mode with hard-coded column mappings; adjust if your sheet uses different column names. 4. No error handling or retry nodes are included; consider adding them for production use. 5. This site has not tested the workflow; reproduction=not_tested.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • After import, connect your own credentials on auth-required nodes; author secrets are not included.

Configuration to replace

  • Source template is n8n public workflow #19931 (~7 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Configure credentials and spreadsheet

    Add and verify credentials for Google Sheets, OpenAI, and Gmail in n8n. Select the target Google Sheets document and worksheet, ensuring the sheet includes FirstName, Company, Industry, Status, and AI Summary columns. Set the same document and worksheet in both the Google Sheets Trigger and the Update Google Sheet node.

  2. Set up the Sheets trigger

    Configure the Google Sheets Trigger node (When Sheet Updated) with poll interval everyMinute. Provide the documentId and sheetName so the workflow starts when new or updated rows appear.

  3. Generate lead insights with OpenAI

    Configure the OpenAI Lead Insights node with model gpt-4o-mini. Enter the following user message in the messages field, using the Company and Industry fields from the Sheets row as variables.

    Execution prompt · Source text。OpenAI Lead Insights node messages.values[0].content field

    =Analyze this lead company: {{ $json.Company }} in industry {{ $json.Industry }}. Write a short 2-sentence summary of what they do and suggest a value proposition for an automation solution.
  4. Draft the Gmail message

    Configure the Draft Gmail Reply node with resource set to draft and emailType set to text. Use the recipient from the Sheets row (or specify separately), and set the subject and body using the templates below, where FirstName and Company come from Sheets and output comes from the previous OpenAI step.

    Execution prompt · Source text。Draft Gmail Reply node message field

    =Hi {{ $json.FirstName }},
    
    I noticed your work at {{ $json.Company }}.
    
    {{ $json.output }}
    
    Would you be open to a brief chat this week?
    
    Best regards,
    Adetunji

    Execution prompt · Source text。Draft Gmail Reply node subject field

    =Exploring Automation Opportunities for {{ $json.Company }}
  5. Write status back to Sheets

    Configure the Update Sheet Status in Sheets node with operation set to update. Map columns: Status hard-coded to "Draft Created", AI Summary set to the previous OpenAI output variable {{ $json.output }}. Ensure documentId and sheetName match the trigger node so the correct original row is updated.

Prompt you can copy

Setup guidance · Editorial suggestion。Give to setup assistant; confirm inputs and permissions first

This block is the prompt. Ads are never placed here.

You are setting up an n8n workflow: pull new leads from Google Sheets, use GPT-4o-mini to generate a company summary and automation value proposition, create a Gmail draft, then write the AI summary and status back to Sheets. First confirm you have: an n8n instance, credentials for Google Sheets/OpenAI/Gmail, and a sheet with FirstName/Company/Industry/Status/AI Summary columns. Then configure the trigger, OpenAI node, Gmail draft node, and Sheets update node step by step. Adjust the OpenAI prompt and email template if you need different tone or scoring logic.

Verify credentials and column names before importing workflow.json or configuring nodes manually; replace the hard-coded signature "Adetunji" with your own name.

Source

Enrich Google Sheets leads with OpenAI GPT-4o-mini and draft Gmail outreach · twonjee2002 · n8n.io · 2026-09-25

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related