AutomationFlowsAI & RAG › Generate Personalized Cold Email Icebreakers with Gpt-4o-mini and Google Sheets

Generate Personalized Cold Email Icebreakers with Gpt-4o-mini and Google Sheets

ByRodrigo @rodrigonzalezsyncra on n8n.io

This workflow helps you supercharge your cold email campaigns by enriching leads in Google Sheets with AI-generated personalization. For every lead in your sheet, the workflow: Fetches rows from Google Sheets Loops through each lead one by one Uses OpenAI to generate: A…

Event trigger★★★★☆ complexityAI-powered10 nodesGoogle SheetsOpenAI
AI & RAG Trigger: Event Nodes: 10 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Google Sheets → OpenAI 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
{
  "id": "8yxaQbSKa73Naaoq",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Cold Email Icebreaker Generator With GPT 4o-mini Template",
  "tags": [],
  "nodes": [
    {
      "id": "6e508452-0193-4fc6-9762-a53d57b5a02a",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -32,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d564d4ce-92c9-4797-868a-697f8a5e9ecd",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        192,
        0
      ],
      "parameters": {
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.6
    },
    {
      "id": "6574b56d-b207-48a5-bcf7-4f9d54332e52",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        624,
        16
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a data-to-JSON generator. \nYou must return ONLY a valid JSON object with no text before or after. \nDo not add explanations, line breaks, or commentary outside the JSON. \nStrict schema:\n\n{\n  \"verdict\": \"true\" or \"false\",\n  \"icebreaker\": \"string\",\n  \"shortenedCompanyName\": \"string\"\n}\n"
            },
            {
              "content": "=Your task is to write a natural, close, and spartan one-line icebreaker for a cold email.  \nIt should feel like I\u2019ve done my homework on the person \u2014 specific and genuine, not generic.  \n\nOutput rules:\n- \"verdict\" = \"true\" if the input is a person, \"false\" if it\u2019s a company.  \n- \"icebreaker\" must:  \n  - Start with: \"Hey [firstName],\"  \n  - Use a natural \u201cI love\u2026\u201d or \u201cI really like\u2026\u201d structure, but go deeper than surface-level (highlight something real from their role, company, industry, or city).  \n  - Keep it casual, like talking to a friend \u2014 no hype, no formal language.  \n  - One line only.  \n- End the icebreaker with a short, natural transition phrase like \u201cwanted to run something by you\u201d (or variations such as \u201cthought I\u2019d reach out\u201d / \u201cfigured I\u2019d connect\u201d).\n- \"shortenedCompanyName\": shorten the company name (remove \u201cInc.\u201d, \u201cLLC\u201d, \u201cAgency\u201d, etc).  \n\nExamples:  \nInput: \"Aina Rakotoarinaly, CEO founder - Maki Agency/Ti'bouffe, Maki Agency, outsourcing/offshoring, Antananarivo, Madagascar\"  \nOutput: {\"verdict\":\"true\",\"icebreaker\":\"Hey Aina, I love how you\u2019ve built Maki into a go-to shop for outsourcing in Antananarivo.\",\"shortenedCompanyName\":\"Maki\"}\n\nInput: \"Adam Greenwood, Visionary Agency Leader | Digital Strategy & AI | Middle East, UK and Global Markets, the human tech agency, information technology & services, Dubai, United Arab Emirates\"  \nOutput: {\"verdict\":\"true\",\"icebreaker\":\"Hey Adam, I love how The Human Tech Agency mixes digital strategy with AI across global markets \u2014 super smart. Thought I\u2019d reach out.\",\"shortenedCompanyName\":\"The Human Tech Agency\"}\n\nNow generate JSON for:\n{{ $json.firsName }} {{ $json.lastName }}, {{ $json.headline }}, {{ $json.industry }}, {{ $json.companyName }}, {{ $json.city }}, {{ $json.email }}"
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "0bcf09d1-f467-4578-9abf-981a24baddfe",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        416,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "0d808a31-0bf6-4ec5-9491-2e02f805fc14",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        960,
        16
      ],
      "parameters": {
        "columns": {
          "value": {
            "icebreaker": "={{ $json.choices[0].message.content.icebreaker }}",
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "shortenedCompanyName": "={{ $json.choices[0].message.content.shortenedCompanyName }}"
          },
          "schema": [
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "last_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "last_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "headline",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "headline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "industry",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "city",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "city",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "country",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "icebreaker",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "icebreaker",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "shortenedCompanyName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "shortenedCompanyName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "linkedin_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "linkedin_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1R1PdKdw1UH1YCGOK94xPFlAM7Qqfkiz6sa7kihIsyX0/edit#gid=0",
          "cachedResultName": "Hoja 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "7e71ea4a-af5f-4bf8-8ef0-6fd76d7990b9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -320
      ],
      "parameters": {
        "color": 4,
        "width": 192,
        "height": 272,
        "content": "## Fetch Leads from Google Sheets\nPulls lead data from your Google Sheet.  \nEach row should contain details like:  \n- First name  \n- Last name  \n- Company name  \n- Industry  \n- City  \n- (Any other fields you want to use for personalization)  \n\n\u26a0\ufe0f Make sure your sheet has consistent columns with the lead information you need.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "b4b1fa0f-8f4e-4d82-941e-b01f1cf0d888",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "## Workflow Trigger\nThis workflow runs on-demand when you click **Execute Workflow**.  \nUse it whenever you want to enrich your Google Sheet with fresh personalization for leads.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "c1310003-7c1c-43b1-af57-02ae1684836f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -320
      ],
      "parameters": {
        "color": 6,
        "width": 288,
        "height": 272,
        "content": "## Generate Personalization with AI\nUses OpenAI to create two fields:  \n- `icebreaker` \u2192 a short, natural, friendly opening line for your cold email.  \n- `shortenedCompanyName` \u2192 a simplified company name (e.g. \"Mayo\" instead of \"Mayo Inc.\").  \n\nThe AI always returns results in structured JSON.  \nThis makes it easy to map into your Google Sheet in the next step.  \n\n\ud83d\udca1 You can edit the prompt in this node to match your preferred tone and style, as well as for adding your own column names and fields.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "baefc452-c9d5-422c-acce-9c3444afbb37",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -320
      ],
      "parameters": {
        "color": 5,
        "width": 192,
        "height": 272,
        "content": "## Process Each Lead\nThis node loops through your sheet **one lead at a time**.  \nThis prevents errors with Google Sheets or the AI model.  \n\n\u2705 Ensures each lead gets its own personalized icebreaker and shortened company name.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "81fbe23c-c5d5-4900-9d11-a5251ebfba8c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -320
      ],
      "parameters": {
        "color": 4,
        "width": 192,
        "height": 272,
        "content": "## Save Results into Google Sheets\nWrites the AI-generated results back into your Google Sheet.  \n\n- Map `icebreaker` to your sheet\u2019s personalization column (or create one).  \n- Map `shortenedCompanyName` to the column where you want to store shortened names.  \n\n\u26a0\ufe0f Your sheet may have different column names \u2014 adjust mappings here to match your setup.  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "955ec341-ea41-4da0-8ebf-83d56c571dbd",
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "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

This workflow helps you supercharge your cold email campaigns by enriching leads in Google Sheets with AI-generated personalization. For every lead in your sheet, the workflow: Fetches rows from Google Sheets Loops through each lead one by one Uses OpenAI to generate: A…

Source: https://n8n.io/workflows/8070/ — 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

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2
AI & RAG

The Problem That it Solves

Google Drive Trigger, OpenAI, Google Drive +5
AI & RAG

This intelligent email automation workflow helps you maximize engagement through domain-based outreach. It utilizes AI-powered personalization and strategic follow-ups to increase response rates. The

Gmail, HTTP Request, Google Sheets +1
AI & RAG

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid AP

Form Trigger, Google Sheets Trigger, OpenAI +2
AI & RAG

Scrape ads – Pulls Facebook Ad Library data for "ai automation" keywords using Apify Filter & sort – Filters ads by page likes (&gt;1,000) and separates into videos, images, and text ads Analyze creat

HTTP Request, Google Drive, OpenAI +3