AutomationFlowsAI & RAG › Generate Personalized Emails with Gemini and Google Sheets

Generate Personalized Emails with Gemini and Google Sheets

Original n8n title: Automate Cold Outreach with Email Personalization Using Gemini and Google Sheets

ByIntuz @intuz on n8n.io

It connects a Google Sheet of prospect data with Google Gemini to automatically generate highly personalized emails. By analyzing specific keywords and data points like company name, industry, or job title from your sheet, this automated workflow crafts unique, relevant messages…

Cron / scheduled trigger★★★★☆ complexityAI-powered8 nodesGoogle SheetsChain LlmGoogle Gemini ChatOutput Parser Structured
AI & RAG Trigger: Cron / scheduled Nodes: 8 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #6089 — we link there as the canonical source.

This workflow follows the Chainllm → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Personalised Mail",
  "nodes": [
    {
      "id": "c3a221a2-d3e3-47f3-a897-6781a29857a4",
      "name": "Read Leads from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -400,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Your_Sheet_GID",
          "cachedResultUrl": "Your_Sheet_URL",
          "cachedResultName": "Your_Sheet_Name"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SPREADSHEET_ID_HERE",
          "cachedResultUrl": "Your_Spreadsheet_URL",
          "cachedResultName": "Your_Spreadsheet_Name"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "23b2b8e8-e26c-4586-9ec1-dba83ab0069c",
      "name": "Prepare Data for Sheet",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        0
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "updated_email",
              "value": "={{ $input.item.json.text }}"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "7e937d3d-3483-442e-b89c-57ce699609ed",
      "name": "Update Sheet with Email",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        620,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $('Read Leads from Sheet').item.json.Email }}",
            "subject": "= {{ $json.output.subject }}",
            "email_body": "={{ $json.output.email_body }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Education",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Education",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_Connections",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "LinkedIn_Connections",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry_Focus",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Industry_Focus",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Key_Expertise",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Key_Expertise",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "LinkedIn_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company_Type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company_Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Focus_Areas",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Focus_Areas",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth_Stage",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Growth_Stage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pain_Points",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Pain_Points",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location_Opportunities",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Location_Opportunities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email_Template",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email_Template",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn_DM_Template",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "LinkedIn_DM_Template",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company_Website",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company_Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email_body",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "email_body",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "subject",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "subject",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Your_Sheet_GID",
          "cachedResultUrl": "Your_Sheet_URL",
          "cachedResultName": "Your_Sheet_Name"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=1p6vuSjRfTiSUrPa3CR4wQA8c9NyuS18K2UMhP_bWx08"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "9120c44a-92a4-4f06-83a5-045bd7e17a07",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        40,
        0
      ],
      "parameters": {
        "text": "=You are an expert email copywriter for Intuz, a company offering AI Engineering and AI Service solutions.\n\nYour task is to generate the components for a single, concise, professional, and conversational email outreach (100-120 words).\n\n---\n**CONTEXT & DATA**\n*   Prospect Name: {{ $('Read Leads from Sheet').item.json.Name }}\n*   Company Name: {{ $('Read Leads from Sheet').item.json.Company }}\n*   Persona / Title: {{ $('Read Leads from Sheet').item.json.Title }}\n*   CTA Link: [https://calendly.com/YOUR_LINK]\n\n---\n**INSTRUCTIONS**\n*   **Pain Point:** Focus on one of these: slow AI feature rollouts, difficulty integrating AI, scaling challenges, or security concerns.\n*   **Value Proposition:** Highlight how Intuz's AI Engineering services solve that specific pain point (e.g., rapid development, seamless integration, scalable workflows).\n*   **Structure:** The email body must start with a question addressing the pain point, briefly explain the solution, and end with a CTA for a 15-minute call using the provided link.\n*   **Tone:** Conversational, empathetic, and professional.\n*   **Subject Line:** Generate a catchy, question-based subject line (under 8 words) tied to the pain point.\n*   **Personalization:** Use the prospect's data to tailor the message.\n*   **CRITICAL FORMATTING:** Structure the `email_body` into 3 distinct paragraphs. Use the markdown newline character `\\n\\n` to separate each paragraph for clean spacing and readability.\n*   **Constraints:** Keep the body 100-120 words. No salutation (e.g., \"Hi Tobias,\") or sign-off (e.g., \"Best,\") should be included in the email body.\n\n---\n**REQUIRED OUTPUT**\nYou MUST format your response as a valid JSON object containing two keys: \"subject\" and \"email_body\".",
        "batching": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "3434b60b-85ea-4221-94c4-3abf64f8ff17",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        60,
        220
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e62f603b-d063-4f90-9d13-ce599b536bed",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        180,
        220
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"subject\": \"A short, catchy, question-based subject line\",\n  \"email_body\": \"The full email body, 100-120 words, without any salutation or sign-off.\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "323a2628-a30a-4b20-8a56-2d0677c6c5af",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -620,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cbca8f8d-959d-45b9-a801-20386034a844",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -180,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0640b75d-662e-4625-a038-92c099b79f25",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.email_body }}",
              "rightValue": ""
            },
            {
              "id": "6d30f170-03fd-4e89-9a56-ab87e8c7c01a",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.subject }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Prepare Data for Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Read Leads from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Leads from Sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Data for Sheet": {
      "main": [
        [
          {
            "node": "Update Sheet with Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet with Email": {
      "main": [
        []
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

It connects a Google Sheet of prospect data with Google Gemini to automatically generate highly personalized emails. By analyzing specific keywords and data points like company name, industry, or job title from your sheet, this automated workflow crafts unique, relevant messages…

Source: https://n8n.io/workflows/6089/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Effortlessly generate, review, and publish SEO-optimized blog posts to WordPress using AI and automation.

WordPress, Google Gemini Chat, Output Parser Structured +6
AI & RAG

This n8n workflow automatically monitors YouTube channels, transcribes new videos, and generates AI-powered summaries with relevance scoring. It pulls channel URLs from a Google Sheet, fetches recent

Output Parser Structured, Google Gemini Chat, Chain Llm +2
AI & RAG

Transform your festival marketing with this comprehensive automation workflow that creates and posts culturally authentic social media content across multiple platforms daily.

Google Sheets, Output Parser Structured, Chain Llm +5
AI & RAG

It transforms a basic list of LinkedIn profiles into a campaign-ready database by first enriching contacts with detailed career data and then using AI to craft unique, context-aware emails based on ea

Google Sheets, @Apify/N8N Nodes Apify, Output Parser Structured +2
AI & RAG

Sign up for Decodo HERE for Discount

Google Sheets, Google Gemini Chat, Output Parser Structured +2