Bereinigung von Cold-E-Mail-Firmennamen mit GPT-4 Mini und Google Sheets

Fortgeschritten

Dies ist ein Lead Generation, AI Summarization-Bereich Automatisierungsworkflow mit 12 Nodes. Hauptsächlich werden Set, Merge, FormTrigger, GoogleSheets, ChainLlm und andere Nodes verwendet. Kalt-E-Mail-Firmennamen mit GPT-4 Mini und Google Tabellen bereinigen

Voraussetzungen
  • Google Sheets API-Anmeldedaten
  • OpenAI API Key
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "meta": {
    "instanceId": "9192ad8880fb52b25f18408be81eae9d996a6784a1da3c68d52d3b7ef01d482b",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "fce88a0b-ba03-4657-8d7c-62a96bb12d50",
      "name": "Leads abrufen",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        260,
        -35
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "0"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('On Form Submit').item.json['Lead Spreadsheet Url'] }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "KzK0OnjPiiYVoDTG",
          "name": "Google Sheets | Paper Jam"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "73e028cc-a9e0-4bf1-ac13-5fb9a5e937da",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        60
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "xn9xslEO7m3MAqNQ",
          "name": "OpenAI | Paper Jam"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1b43f3d4-d9d6-4929-8fad-dc9f884feff9",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        660,
        60
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"cleanCompanyName\": \"Techwave\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7",
      "name": "Firmennamen bereinigen",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        480,
        -160
      ],
      "parameters": {
        "text": "=Company Name:  {{ $json.Company }}",
        "batching": {
          "batchSize": 5
        },
        "messages": {
          "messageValues": [
            {
              "message": "**Situation** \nYou are processing a lead list for a cold email campaign where company names  will be used as personalization variables. The raw company names in the dataset contain various formatting inconsistencies, unnecessary suffixes, taglines, and casing issues that make them unsuitable for professional, natural, personalized outreach.  \n\n**Task** \nClean and standardize company names from a lead list to create professional, polished variables suitable for cold email personalization. For each company name provided, you must: \n1. Remove common business suffixes (LLC, Inc., Corp., Corporation, Ltd., Limited, Co., Company, etc.) \n2. Remove common words that are in the formal company name but that a human likely wouldn't include when identifying the company in an email (Systems, Solutions, Communications, Agency, Group, Partners, etc.)\n3. Remove taglines, slogans, or descriptive phrases (typically found after dashes, pipes, or \"the\" statements) \n4. Apply proper title case formatting \n5. Shorten names to their most recognizable form when possible while maintaining professionalism \n6. Ensure the result maintains the company's professional identity and recognizability  \n\n**Objective** \nTransform formal, cluttered company names into clean, professional versions that will make cold emails feel more natural, personal and polished, ultimately improving engagement rates and response likelihood in the outreach campaign.\n\n**Knowledge** \n- Business suffixes to remove include: LLC, Inc., Corp., Corporation, Ltd., Limited, Co., Company, LP, LLP, PC, PLLC, and their variations with different punctuation \n- Taglines often appear after symbols like: dash (-), pipe (|), colon (:), or phrases starting with \"the,\" \"your,\" \"we,\" etc. \n- Proper title case means capitalizing the first letter of each major word, but keeping articles, prepositions, and conjunctions lowercase unless they start the name. Acronyms should remain in all caps.\n- Maintain professional tone \n- Keep established business names recognizable (e.g., \"Microsoft Corporation\" becomes \"Microsoft\") \n- Avoid over-shortening if it makes the company unrecognizable or unprofessional \n- Service descriptions and taglines should be completely removed (e.g., \"ExtraSlice, LLC - Workspace as a Service\" becomes \"ExtraSlice\")  \n\n<examples> \nInput: \"ExtraSlice, LLC - Workspace as a Service\" \nOutput: \"ExtraSlice\"  \n\nInput: \"ACRE Solutions\" \nOutput: \"ACRE\"  \n\nInput: \"MRP Capital Group\" \nOutput: \"MRP\"  \n\nInput: \"Paul & Associates Real Estate Services\" \nOutput: \"Paul & Associates\"  \n\nInput: \"Global Valuation & Consulting, LLC.\" \nOutput: \"Global Valuation & Consulting\"  \n\nInput: \"Agent Career Education | Ace\" \nOutput: \"Agent Career Education\"  \n\nInput: \"PROPERTY AGENTS\" \nOutput: \"Property Agents\"  \n\nInput: \"Agently - Agent Success Platform for Brokerages\" \nOutput: \"Agently\"  \n\nInput: \"Monserrate Premium Home Agents\" \nOutput: \"Monserrate\"  \n\nInput: \"Belmont Howard Group, LLC.\"\nOutput: \"Belmont Howard\"  \n\nInput: \"BruZiv Partners, LLC\" \nOutput: \"BruZiv\"  \n\nInput: \"Van Vlissingen and Co.\" \nOutput: \"Van Vlissingen\" \n</examples>\n\nIt's critical that the company's professional recognizability while removing all unnecessary suffixes and taglines - the cleaned name must sound natural and professional when used in a business email context."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "5d61e2e3-f881-4919-87ae-5af5a62e12a1",
      "name": "Zusammenführen",
      "type": "n8n-nodes-base.merge",
      "position": [
        856,
        -35
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "11b87495-d6a1-4e72-a019-efbb44a7c8dc",
      "name": "Felder bearbeiten",
      "type": "n8n-nodes-base.set",
      "position": [
        1076,
        -35
      ],
      "parameters": {
        "include": "except",
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4195d1e4-0d85-43e9-be6e-085944f197df",
              "name": "Clean Company Name",
              "type": "string",
              "value": "={{ $json.output.cleanCompanyName }}"
            }
          ]
        },
        "excludeFields": "output,row_number",
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "1883c284-9adf-43e5-8461-d419f112379a",
      "name": "Ausgabe speichern",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1300,
        -40
      ],
      "parameters": {
        "columns": {
          "value": {},
          "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,
              "removed": false,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn Url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn Url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Clean Company Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Clean Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": true
        },
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Create Destination Sheet').item.json.sheetId }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Create Destination Sheet').item.json.spreadsheetId }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "KzK0OnjPiiYVoDTG",
          "name": "Google Sheets | Paper Jam"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "602d2068-9694-4722-ac83-909a37bc0c4c",
      "name": "Ziel-Tabelle erstellen",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        -35
      ],
      "parameters": {
        "title": "Cleaned Companies",
        "options": {
          "tabColor": "0aa55c"
        },
        "operation": "create",
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('On Form Submit').item.json['Lead Spreadsheet Url'] }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "KzK0OnjPiiYVoDTG",
          "name": "Google Sheets | Paper Jam"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "dd66b31e-aaa1-4e23-95e7-da2e62e9dc99",
      "name": "Bei Formularabgabe",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -180,
        -35
      ],
      "webhookId": "6ff9a6f5-1f05-4d03-ae18-cab031763ebc",
      "parameters": {
        "options": {},
        "formTitle": "Clean Up Company Names",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Lead Spreadsheet Url",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ecb26e43-a1fb-4d08-b871-444c7f0d4b75",
      "name": "Notiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 660,
        "height": 560,
        "content": "## Prep and save output\nHere we merge in the LLM's output with the original lead data and save everything back to the new sheet we created earlier in the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "ae44d84f-f177-4b01-ab27-29dda23f53d8",
      "name": "Notiz1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 620,
        "height": 560,
        "content": "## Fetch the lead data\nWhen a form is submitted with the url to a Google Sheet with the lead data, we create a new sheet in the document that we will use to store the results and fetch all the lead data from the first sheet.\n\nNote that the account associated with the Google Sheet credentials you use must have edit access to the sheet submitted in the form."
      },
      "typeVersion": 1
    },
    {
      "id": "3beae3d0-d242-4430-8d3d-bd0e24cad78f",
      "name": "Notiz2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 560,
        "content": "## Clean up the company name with AI\n**Important**: For better results, update the system prompt with more specific examples based on the company industry / patterns in your lead data."
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "5d61e2e3-f881-4919-87ae-5af5a62e12a1": {
      "main": [
        [
          {
            "node": "11b87495-d6a1-4e72-a019-efbb44a7c8dc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fce88a0b-ba03-4657-8d7c-62a96bb12d50": {
      "main": [
        [
          {
            "node": "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7",
            "type": "main",
            "index": 0
          },
          {
            "node": "5d61e2e3-f881-4919-87ae-5af5a62e12a1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "11b87495-d6a1-4e72-a019-efbb44a7c8dc": {
      "main": [
        [
          {
            "node": "1883c284-9adf-43e5-8461-d419f112379a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dd66b31e-aaa1-4e23-95e7-da2e62e9dc99": {
      "main": [
        [
          {
            "node": "602d2068-9694-4722-ac83-909a37bc0c4c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73e028cc-a9e0-4bf1-ac13-5fb9a5e937da": {
      "ai_languageModel": [
        [
          {
            "node": "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7": {
      "main": [
        [
          {
            "node": "5d61e2e3-f881-4919-87ae-5af5a62e12a1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "602d2068-9694-4722-ac83-909a37bc0c4c": {
      "main": [
        [
          {
            "node": "fce88a0b-ba03-4657-8d7c-62a96bb12d50",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1b43f3d4-d9d6-4929-8fad-dc9f884feff9": {
      "ai_outputParser": [
        [
          {
            "node": "15fe57a0-4cd5-4907-b9cf-103d5be6cdc7",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Lead-Generierung, KI-Zusammenfassung

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes12
Kategorie2
Node-Typen8
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
James Francis

James Francis

@paperjam

👋 Hi, I'm James. I run an AI automation agency focused on building small, focused workflows that have a direct and measurable impact on business growth or optimization.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34