{
  "name": "K&S-Media Downloadliste SQL",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -960,
        800
      ],
      "id": "65d13e01-6543-4c3e-ba6f-0c62813779f3",
      "name": "When clicking \u2018Test workflow\u2019"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "=Company {{ $('Loop Over Items').first().json.Company }} at {{ $('Loop Over Items').first().json.Address.match(/,\\s*(.*)/)[1] }} {{ $('Loop Over Items').first().json.Country }}\n"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-KEY",
              "value": "4ff0d5d9bf4ba4ca7779a75c034f12fbf1fd8e92"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2540,
        2120
      ],
      "id": "ad71fb8d-9e18-4310-bbba-d303c2d0e342",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1240,
        2860
      ],
      "id": "7b14237b-cc37-4dde-9255-e8060ad41b02",
      "name": "Loop Over Items"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Replace Me",
      "typeVersion": 1,
      "position": [
        6120,
        2880
      ],
      "id": "55da018a-b0af-4432-8be1-be136b4f753d"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Company {{ $('Loop Over Items').first().json.Company }} in {{ $('Loop Over Items').first().json['Form-Language'] }} {{ $('Loop Over Items').first().json.Country }} does {{ $json.output }} ",
        "options": {
          "systemMessage": "Du bist ein hochqualifizierter Firmenklassifizierer und Rechercheur mit Zugriff auf zuverl\u00e4ssige Datenquellen.\nDeine Aufgabe ist es, ein Unternehmen anhand des Firmennamens und einer kurzen T\u00e4tigkeitsbeschreibung kontextbezogen zu bewerten.\n\nZu ber\u00fccksichtigende Branchen\n\nAkustik (Raumakustik, Schalld\u00e4mmung, Beschallungstechnik, Audio)\nB\u00fcro (B\u00fcroplanung, B\u00fcrom\u00f6bel, B\u00fcro\u2011Trennw\u00e4nde, Drucker, Druckerverleih, B\u00fcrost\u00fchle, B\u00fcrotische, B\u00fcro\u2011IT)\nName als Indikator\n\nEgal, ob Dienstleistung, Produkt, Entwicklung, Verkauf, Vermietung oder Beratung \u2013 z\u00e4hlt nur, ob das Hauptgesch\u00e4ft ausschlie\u00dflich oder haupts\u00e4chlich in einer oder beiden dieser Branchen liegt.\n\nEnth\u00e4lt der Firmenname ausschlie\u00dflich Keywords aus Akustik oder B\u00fcrobranche (z.\u00a0B. \u201eB\u00fcroplaner GmbH\u201c, \u201eAkustikmeister GmbH\u201c), wertet das stark f\u00fcr 1.\nVerkn\u00fcpft der Name Zielbranchen mit anderen Bereichen (z.\u00a0B. \u201eAkustik und Fitnessger\u00e4te GmbH\u201c), gilt das als 0.\nFehlen im Namen Treffer, bewerte nur anhand der T\u00e4tigkeitsbeschreibung.\nEntscheidungsregeln\n\n1, wenn Name und/oder jede genannte T\u00e4tigkeit ausschlie\u00dflich oder \u00fcberwiegend zu Akustik und/oder B\u00fcro\u00adbranche geh\u00f6rt.\n0, sobald Name oder mindestens eine T\u00e4tigkeit klar nicht dazugeh\u00f6rt (z.\u00a0B. Schultische, Fu\u00dfballklamotten, Festivaltechnik).\n1, wenn T\u00e4tigkeiten unklar sind, aber eindeutige Keywords aus Zielbranchen vorliegen und der Name nicht widerspricht.\n0, wenn es sich lediglich um einen normalen M\u00f6belh\u00e4ndler ohne spezifischen B\u00fcro\u00adbezug handelt.\nWichtig\n\nVerstehe Zusammenh\u00e4nge: \u201eDruckerverleih\u201c z\u00e4hlt zu B\u00fcrobranche; \u201eSchultische\u201c nicht.\nBeurteile ganzheitlich: Name\u00a0+\u00a0Beschreibung m\u00fcssen passen.\nGib nur den Integer 0 oder 1 zur\u00fcck \u2013 keine Erkl\u00e4rungen, Kommentare oder zus\u00e4tzlichen Text.\nInput\n\u2013 Firmenname\n\u2013 T\u00e4tigkeitsbeschreibung (Liste, z.\u00a0B. \u201eB\u00fcrom\u00f6belverkauf, Druckerverleih, Raumakustik-Planung\u201c)\n\nOutput\n\n0\u00a0oder\u00a01"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        3100,
        2120
      ],
      "id": "182a4ebf-e459-47fa-88a8-afb1f30ce5c8",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1135880709,
          "mode": "list",
          "cachedResultName": "RowsToDelete",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=1135880709"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "User-IP": "={{ $('Loop Over Items').first().json['User-IP'] }}",
            "Date": "={{ $('Loop Over Items').first().json.Date }}",
            "Time": "={{ $('Loop Over Items').first().json.Time }}",
            "Form-Language": "={{ $('Loop Over Items').first().json['Form-Language'] }}",
            "First name": "={{ $('Loop Over Items').first().json['First name'] }}",
            "Salutation": "={{ $('Loop Over Items').first().json.Salutation }}",
            "Name": "={{ $('Loop Over Items').first().json.Name }}",
            "Company": "={{ $('Loop Over Items').first().json.Company }}",
            "Address": "={{ $('Loop Over Items').first().json.Address }}",
            "Country": "={{ $('Loop Over Items').first().json.Country }}",
            "E-Mail": "={{ $('Loop Over Items').first().json['E-Mail'] }}",
            "Newsletter": "={{ $('Loop Over Items').first().json.Newsletter }}",
            "How did you become attentive on the pCon.planner": "={{ $('Loop Over Items').first().json['How did you become attentive on the pCon.planner'] }}",
            "I use the pCon.planner as": "={{ $('Loop Over Items').first().json['I use the pCon.planner as'] }}",
            "Version": "={{ $('Loop Over Items').first().json.Version }}",
            "Edition": "={{ $('Loop Over Items').first().json.Edition }}",
            "branche": "={{ $('AI Agent1').first().json.output }}"
          },
          "matchingColumns": [
            "User-IP"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        4900,
        2100
      ],
      "id": "ef5f59ea-8eb7-44d4-9dd2-70d53b24c789",
      "name": "Google Sheets1",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Company {{ $('Loop Over Items').first().json.Company }} in {{ $('Loop Over Items').first().json['Form-Language'] }} {{ $('Loop Over Items').first().json.Country }}is a {{ $json.knowledgeGraph.type }} {{ $json.organic[0].snippet }} {{ $json.organic[2].snippet }} ",
        "options": {
          "systemMessage": "Du bist ein hochqualifizierter Firmenklassifizierer und Rechercheur mit Zugriff auf zuverl\u00e4ssige Datenquellen.\nDeine Aufgabe ist es, ein Unternehmen anhand des Firmennamens und einer kurzen T\u00e4tigkeitsbeschreibung pr\u00e4zise zu analysieren.\n\nAnleitung:\n\nNutze sowohl Firmennamen als auch T\u00e4tigkeitsbeschreibung, um die tats\u00e4chlichen Kernt\u00e4tigkeiten zu ermitteln.\nGib so viele der wichtigsten T\u00e4tigkeiten aus, wie tats\u00e4chlich vorhanden sind (mindestens\u00a02, maximal\u00a05).\nFormuliere jede T\u00e4tigkeit als Stichpunkt mit 3\u20135 W\u00f6rtern.\nKeine Branchenbezeichnungen, Einordnungen, Erkl\u00e4rungen oder Zusatzinfos.\nKeine Wiederholungen oder Synonyme.\nDie Ausgabe ist eine durch Kommas getrennte Liste der Stichpunkte.\nBeispielausgaben:\n\n\u201eB\u00fcrom\u00f6belverkauf, Festivalorganisation, H\u00f6rger\u00e4teanpassung, Grafikdesign, Immobilienvermittlung\u201c\n\u201eH\u00f6rger\u00e4teberatung, Schalld\u00e4mmungssysteme, Konferenzmikrofontechnik\u201c\n\u201eErgonomische B\u00fcrost\u00fchle, Akustikdeckenmontage, Schulm\u00f6belproduktion\u201c"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        2740,
        2120
      ],
      "id": "b41e76bf-a23e-4f8b-b61c-083f3f3f896f",
      "name": "AI Agent1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $('AI Agent').first().json.output }}",
              "rightValue": "1",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3680,
        2120
      ],
      "id": "c93c0e84-46d6-4f7f-b65a-2023b18bc6be",
      "name": "If1"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        960,
        2860
      ],
      "id": "333f92a5-577f-4a60-bf83-e0d9d385461f",
      "name": "Google Sheets3",
      "alwaysOutputData": false,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "# Is critical branche",
        "height": 2220,
        "width": 6680,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        1660
      ],
      "typeVersion": 1,
      "id": "f44180d0-5884-4930-bde5-30a55cff5d7c",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $('Loop Over Items3').first().json.Company }} at {{ $('Loop Over Items3').first().json.Address.match(/,\\s*(.*)/)[1] }} telefonnummer {{ $('Loop Over Items3').first().json.Country }}\n"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-KEY",
              "value": "4ff0d5d9bf4ba4ca7779a75c034f12fbf1fd8e92"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3280,
        4040
      ],
      "id": "cf634ade-2915-42eb-b5b0-f0c145c8864f",
      "name": "HTTP Request1"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1240,
        4260
      ],
      "id": "8fe686e2-7b55-41fb-ab49-5e5b4b2e68a3",
      "name": "Loop Over Items3"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Replace Me3",
      "typeVersion": 1,
      "position": [
        6620,
        4240
      ],
      "id": "a7737cea-a8f3-4595-a7d5-9ef4e82d55f8"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        3880,
        4800
      ],
      "id": "3b1a02f2-c342-479b-a7a2-afa31939b504",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Loop Over Items3').first().json.row_number}}",
            "CompanyPhone": "={{ JSON.stringify($('AI Agent4').first().json.output) }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CompanyPhone",
              "displayName": "CompanyPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        5100,
        4420
      ],
      "id": "31d3aba1-357a-48e3-8081-b972ad917340",
      "name": "Google Sheets9",
      "executeOnce": true,
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.answerBox.title }} {{ $json.answerBox.answer }};;; {{ $json.organic[0].title }}{{ $json.organic[0].snippet }};;;{{ $json.organic[2].title }}{{ $json.organic[2].snippet }};;;{{ $json.organic[3].title }}{{ $json.organic[3].snippet }};;;",
        "options": {
          "systemMessage": "=Du bist ein spezialisierter Filter f\u00fcr Telefonnummern von Firmen. Deine Aufgabe ist es, die Telefonnummer der Firma {{ $('Loop Over Items3').first().json.Company }} in {{ $('Loop Over Items3')?.first()?.json.Address && $('Loop Over Items3')?.first()?.json.Address.match(/,\\s*(.*)/) ? $('Loop Over Items3')?.first()?.json.Address.match(/,\\s*(.*)/)[1] : '' }}\n {{ $('Loop Over Items3').first().json.Country }} aus den gegebenen Suchergebnissen zu extrahieren. \n\n## Regeln:\n1. Die Suchergebnisse sind durch `;;;` getrennt.\n2. Gib nur die Telefonnummer aus dem ersten Ergebnis zur\u00fcck, falls sie vorhanden ist. Falls im ersten Ergebnis keine g\u00fcltige Telefonnummer enthalten ist, suche im zweiten.\n3. Stelle sicher, dass die gefundene Telefonnummer auch wirklich der Firma {{ $('Loop Over Items3').item.json.Company }} in {{ $('Loop Over Items3')?.item?.json.Address && $('Loop Over Items3')?.item?.json.Address.match(/,\\s*(.*)/) ? $('Loop Over Items3')?.item?.json.Address.match(/,\\s*(.*)/)[1] : '' }}\n {{ $('Loop Over Items3').item.json.Country }} zugeordnet ist. Achte besonders darauf, dass die Telefonnummer aus einer verl\u00e4sslichen Quelle stammt und der Firma zugeordnet werden kann.\n4. Wenn keine g\u00fcltige Telefonnummer gefunden wird, gib none zur\u00fcck.\n\nGib nur die Telefonnummer zur\u00fcck mit zwei einzigen kurzen worten das beschreibt wo du sie gefunden hast und zu wem sie geh\u00f6rt. Wenn du dazu keine Information hast schreibe \"allgemein\". Keine weiteren Informationen. z.B.\nAnna Schuhmann: +49 44040033003\nallgemein: 40400404\n\nwenn du keine passende Telefonnummer findest gebe nur none zurr\u00fcck und sonst nichts "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        3620,
        4040
      ],
      "id": "acfef92d-8704-4396-94e5-d8e640cce987",
      "name": "AI Agent3",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $json.output }}",
              "rightValue": "none",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        4180,
        4040
      ],
      "id": "b5be9a8b-826f-401f-bad3-c52af77479c8",
      "name": "If3"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        960,
        4280
      ],
      "id": "d1707245-a661-4505-8a78-035e57b7d76a",
      "name": "Google Sheets11",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "# Find company phonenumber\n",
        "height": 1220,
        "width": 6700,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        3860
      ],
      "typeVersion": 1,
      "id": "92d5df79-5c8e-462e-a931-59af4a56dc7f",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Code1').first().json.cleanedText }}\n",
        "options": {
          "systemMessage": "=Suche hier die telefonnummer raus und Gib nur die Telefonnummer zur\u00fcck mit zwei einzigen kurzen worten das beschreibt wo du sie gefunden hast und zu wem sie geh\u00f6rt. Wenn du dazu keine Information hast schreibe \"allgemein\". Keine weiteren Informationen. z.B.\nAnna Schuhmann: +49 44040033003\nallgemein: 40400404\n\nwenn du keine passende Telefonnummer findest gebe nur none zurr\u00fcck und sonst nichts "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        4140,
        4300
      ],
      "id": "11332c7f-8c56-425d-b550-3b587fe0a4f8",
      "name": "AI Agent4",
      "alwaysOutputData": false,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $json.output }}",
              "rightValue": "none",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        4620,
        4300
      ],
      "id": "d51b1429-bf82-43fe-bb25-fd9e9451d7ea",
      "name": "If4"
    },
    {
      "parameters": {
        "url": "={{ $('Loop Over Items3').first().json['E-Mail'] ? \"http://www.\" + $('Loop Over Items3').first().json['E-Mail'].split(\"@\")[1] : '' }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3240,
        4320
      ],
      "id": "7b52b03d-f18d-4203-a4d7-a994498192e1",
      "name": "HTTP Request3",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "={{ $('Loop Over Items3').first().json['E-Mail'] ? \"http://www.\" + $('Loop Over Items3').first().json['E-Mail'].split(\"@\")[1] + \"/impressum\" : '' }}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3460,
        4320
      ],
      "id": "0a61d027-6db1-4589-95b0-24db29daaa26",
      "name": "HTTP Request2",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6c478565-ae01-4b2d-878f-b2f53ce7d86a",
              "leftValue": "={{ $('Loop Over Items3').first().json['E-Mail'].toString() }}",
              "rightValue": "^[\\w\\.-]+@(gmail|t\\-online|cloud|ooglemail|test|googlemail|yahoo|ymail|rocketmail|hotmail|outlook|live|msn|icloud|me|mac|aol|mail|zoho|gmx|web|t-online|freenet|email|arcor|vodafone|alice|versanet|kabelmail|online|ewetel|protonmail|proton|tutanota|posteo|runbox|mailfence|startmail|fastmail|hushmail|mailbox|bluewin|sunrise|swissonline|hispeed|laposte|libero|tin|seznam|mail\\.ru|yandex|inbox\\.ru|bk\\.ru|list\\.ru|qq|126|163|sina|naver|daum|gawab|cox|comcast|bellsouth|verizon|berlin|aon|inode|chello|utanet|tele2|eduhi|liwest|netcologne|example|seml|mailinator|pm|clonemailsieure|anonymous|duck)\\.[a-zA-Z]{2,}$",
              "operator": {
                "type": "string",
                "operation": "regex"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2660,
        4260
      ],
      "id": "0fb96c92-663c-4be9-b25d-90996840c08c",
      "name": "isEmailPrivat1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Replace Me4",
      "typeVersion": 1,
      "position": [
        6960,
        7120
      ],
      "id": "b2eeb359-9d19-4fcd-96b7-cdb45b43cabe"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        860,
        7140
      ],
      "id": "40d7864e-4095-43d3-8e6d-f4802722e9b9",
      "name": "Google Sheets15",
      "alwaysOutputData": false,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6c478565-ae01-4b2d-878f-b2f53ce7d86a",
              "leftValue": "={{ $('Loop Over Items4').first().json.CompanyPhone }}",
              "rightValue": "\"allgemein: allgemein\"",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2720,
        7140
      ],
      "id": "d917621e-7ce4-4628-86d1-cca4443cd2c5",
      "name": "isEmailPrivat2"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1140,
        7140
      ],
      "id": "e250de8c-a571-45c7-a89a-d6dbf9e3ce4f",
      "name": "Loop Over Items4"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ \n  $('Loop Over Items').first().json['E-Mail'] \n    ? $('Loop Over Items').first().json['E-Mail'].split(\"@\")[1] \n    : '' \n}} {{ (() => {\n    const raw = $('Loop Over Items').first().json?.Address || '';\n    const match = raw.match(/\\b\\d{5}\\b/);\n    return match ? match[0] : '';\n  })() \n}}  {{ $('Loop Over Items').first().json.Country }}\n"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-KEY",
              "value": "4ff0d5d9bf4ba4ca7779a75c034f12fbf1fd8e92"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2880,
        2460
      ],
      "id": "7f9d8b44-c107-4834-b1e8-ad74f0055f74",
      "name": "HTTP Request6"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Company {{ \n  $('Loop Over Items').first().json['E-Mail'] \n    ? $('Loop Over Items').first().json['E-Mail'].split(\"@\")[1] \n    : '' \n}}  in {{ $('Loop Over Items').first().json['Form-Language'] }} {{ $('Loop Over Items').first().json.Country }} does {{ $json.output }} ",
        "options": {
          "systemMessage": "Du bist ein hochqualifizierter Firmenklassifizierer und Rechercheur mit Zugriff auf zuverl\u00e4ssige Datenquellen.\nDeine Aufgabe ist es, ein Unternehmen anhand des Firmennamens und einer kurzen T\u00e4tigkeitsbeschreibung kontextbezogen zu bewerten.\n\nZu ber\u00fccksichtigende Branchen\n\nAkustik (Raumakustik, Schalld\u00e4mmung, Beschallungstechnik, Audio)\nB\u00fcro (B\u00fcroplanung, B\u00fcrom\u00f6bel, B\u00fcro\u2011Trennw\u00e4nde, Drucker, Druckerverleih, B\u00fcrost\u00fchle, B\u00fcrotische, B\u00fcro\u2011IT)\nName als Indikator\n\nEgal, ob Dienstleistung, Produkt, Entwicklung, Verkauf, Vermietung oder Beratung \u2013 z\u00e4hlt nur, ob das Hauptgesch\u00e4ft ausschlie\u00dflich oder haupts\u00e4chlich in einer oder beiden dieser Branchen liegt.\n\nEnth\u00e4lt der Firmenname ausschlie\u00dflich Keywords aus Akustik oder B\u00fcrobranche (z.\u00a0B. \u201eB\u00fcroplaner GmbH\u201c, \u201eAkustikmeister GmbH\u201c), wertet das stark f\u00fcr 1.\nVerkn\u00fcpft der Name Zielbranchen mit anderen Bereichen (z.\u00a0B. \u201eAkustik und Fitnessger\u00e4te GmbH\u201c), gilt das als 0.\nFehlen im Namen Treffer, bewerte nur anhand der T\u00e4tigkeitsbeschreibung.\nEntscheidungsregeln\n\n1, wenn Name und/oder jede genannte T\u00e4tigkeit ausschlie\u00dflich oder \u00fcberwiegend zu Akustik und/oder B\u00fcro\u00adbranche geh\u00f6rt.\n0, sobald Name oder mindestens eine T\u00e4tigkeit klar nicht dazugeh\u00f6rt (z.\u00a0B. Schultische, Fu\u00dfballklamotten, Festivaltechnik).\n1, wenn T\u00e4tigkeiten unklar sind, aber eindeutige Keywords aus Zielbranchen vorliegen und der Name nicht widerspricht.\n0, wenn es sich lediglich um einen normalen M\u00f6belh\u00e4ndler ohne spezifischen B\u00fcro\u00adbezug handelt.\nWichtig\n\nVerstehe Zusammenh\u00e4nge: \u201eDruckerverleih\u201c z\u00e4hlt zu B\u00fcrobranche; \u201eSchultische\u201c nicht.\nBeurteile ganzheitlich: Name\u00a0+\u00a0Beschreibung m\u00fcssen passen.\nGib nur den Integer 0 oder 1 zur\u00fcck \u2013 keine Erkl\u00e4rungen, Kommentare oder zus\u00e4tzlichen Text.\nInput\n\u2013 Firmenname\n\u2013 T\u00e4tigkeitsbeschreibung (Liste, z.\u00a0B. \u201eB\u00fcrom\u00f6belverkauf, Druckerverleih, Raumakustik-Planung\u201c)\n\nOutput\n\n0\u00a0oder\u00a01"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        3440,
        2460
      ],
      "id": "f87b43c3-863f-42ba-8db8-a6d42e2652fe",
      "name": "AI Agent2"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1135880709,
          "mode": "list",
          "cachedResultName": "RowsToDelete",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=1135880709"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "User-IP": "={{ $('Loop Over Items').first().json['User-IP'] }}",
            "Date": "={{ $('Loop Over Items').first().json.Date }}",
            "Time": "={{ $('Loop Over Items').first().json.Time }}",
            "Form-Language": "={{ $('Loop Over Items').first().json['Form-Language'] }}",
            "First name": "={{ $('Loop Over Items').first().json['First name'] }}",
            "Salutation": "={{ $('Loop Over Items').first().json.Salutation }}",
            "Name": "={{ $('Loop Over Items').first().json.Name }}",
            "Company": "={{ $('Loop Over Items').first().json.Company }}",
            "Address": "={{ $('Loop Over Items').first().json.Address }}",
            "Country": "={{ $('Loop Over Items').first().json.Country }}",
            "E-Mail": "={{ $('Loop Over Items').first().json['E-Mail'] }}",
            "Newsletter": "={{ $('Loop Over Items').first().json.Newsletter }}",
            "How did you become attentive on the pCon.planner": "={{ $('Loop Over Items').first().json['How did you become attentive on the pCon.planner'] }}",
            "I use the pCon.planner as": "={{ $('Loop Over Items').first().json['I use the pCon.planner as'] }}",
            "Version": "={{ $('Loop Over Items').first().json.Version }}",
            "Edition": "={{ $('Loop Over Items').first().json.Edition }}",
            "branche": "={{ $('AI Agent9').first().json.output }}"
          },
          "matchingColumns": [
            "User-IP"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        5280,
        2460
      ],
      "id": "b0723a9c-4f81-4079-845f-97225e006a00",
      "name": "Google Sheets14",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Company {{ \n  $('Loop Over Items').first().json['E-Mail'] \n    ? $('Loop Over Items').first().json['E-Mail'].split(\"@\")[1] \n    : '' \n}}  in {{ $('Loop Over Items').first().json['Form-Language'] }} {{ $('Loop Over Items').first().json.Country }}is a {{ $json.knowledgeGraph.type }} {{ $json.organic[0].snippet }} {{ $json.organic[2].snippet }} ",
        "options": {
          "systemMessage": "Du bist ein hochqualifizierter Firmenklassifizierer und Rechercheur mit Zugriff auf zuverl\u00e4ssige Datenquellen.\nDeine Aufgabe ist es, ein Unternehmen anhand des Firmennamens und einer kurzen T\u00e4tigkeitsbeschreibung pr\u00e4zise zu analysieren.\n\nAnleitung:\n\nNutze sowohl Firmennamen als auch T\u00e4tigkeitsbeschreibung, um die tats\u00e4chlichen Kernt\u00e4tigkeiten zu ermitteln.\nGib so viele der wichtigsten T\u00e4tigkeiten aus, wie tats\u00e4chlich vorhanden sind (mindestens\u00a02, maximal\u00a05).\nFormuliere jede T\u00e4tigkeit als Stichpunkt mit 3\u20135 W\u00f6rtern.\nKeine Branchenbezeichnungen, Einordnungen, Erkl\u00e4rungen oder Zusatzinfos.\nKeine Wiederholungen oder Synonyme.\nDie Ausgabe ist eine durch Kommas getrennte Liste der Stichpunkte.\nBeispielausgaben:\n\n\u201eB\u00fcrom\u00f6belverkauf, Festivalorganisation, H\u00f6rger\u00e4teanpassung, Grafikdesign, Immobilienvermittlung\u201c\n\u201eH\u00f6rger\u00e4teberatung, Schalld\u00e4mmungssysteme, Konferenzmikrofontechnik\u201c\n\u201eErgonomische B\u00fcrost\u00fchle, Akustikdeckenmontage, Schulm\u00f6belproduktion\u201c"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        3080,
        2460
      ],
      "id": "67e7f9e0-e434-427e-9fc4-c8a20c5668a2",
      "name": "AI Agent9"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $('AI Agent2').first().json.output }}",
              "rightValue": "1",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3780,
        2460
      ],
      "id": "25f17e42-b286-40f3-b48c-b1e8350f34b1",
      "name": "If9"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        3940,
        6980
      ],
      "id": "1adad5f7-e909-4e62-bf23-24da50e9633c",
      "name": "OpenAI Chat Model3",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Loop Over Items4').first().json.row_number}}",
            "CompanyPhone": "={{ JSON.stringify($('AI Agent10').first().json.output) }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CompanyPhone",
              "displayName": "CompanyPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        5140,
        6460
      ],
      "id": "23ed06b9-4250-4cb0-9772-75c583b9642f",
      "name": "Google Sheets19",
      "executeOnce": true,
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('HTTP Request8').first().json?.data || $('HTTP Request8').first().json?.error?.message || $('HTTP Request7').first().json?.data || $('HTTP Request7').first().json?.error?.message || \"nichts gefunden\" }}\n",
        "options": {
          "systemMessage": "=Suche hier die telefonnummer raus und Gib nur die Telefonnummer zur\u00fcck mit zwei einzigen kurzen worten das beschreibt wo du sie gefunden hast und zu wem sie geh\u00f6rt. Wenn du dazu keine Information hast schreibe \"allgemein\". Keine weiteren Informationen. z.B.\nAnna Schuhmann: +49 44040033003\nallgemein: 40400404\n\nwenn du keine passende Telefonnummer findest gebe nur none zurr\u00fcck und sonst nichts "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        4180,
        6480
      ],
      "id": "41f465ce-56a3-415d-87a1-738c6003a003",
      "name": "AI Agent10",
      "alwaysOutputData": false,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $json.output }}",
              "rightValue": "none",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        4660,
        6480
      ],
      "id": "05470432-ff07-4b24-ae19-cf7367b23c86",
      "name": "If10"
    },
    {
      "parameters": {
        "url": "={{ $('Loop Over Items3').first().json['E-Mail'] ? \"http://www.\" + $('Loop Over Items3').first().json['E-Mail'].split(\"@\")[1] : '' }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3440,
        6480
      ],
      "id": "0c2ec041-1fbe-4388-b112-ce4564c255ff",
      "name": "HTTP Request7",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "={{ $('Loop Over Items3').first().json['E-Mail'] ? \"http://www.\" + $('Loop Over Items3').first().json['E-Mail'].split(\"@\")[1] + \"/impressum\" : '' }}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3760,
        6480
      ],
      "id": "dac60b36-4c30-4ef4-bd07-c3feb1f69005",
      "name": "HTTP Request8",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Replace Me5",
      "typeVersion": 1,
      "position": [
        5500,
        1040
      ],
      "id": "3035c0f5-dd46-4906-aa3d-2a5158908c20"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        800,
        1040
      ],
      "id": "dad755d3-f83f-4c32-8c2b-926babd070e5",
      "name": "Google Sheets22",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6c478565-ae01-4b2d-878f-b2f53ce7d86a",
              "leftValue": "={{ $('Loop Over Items5').first().json.Company.toString()}}",
              "rightValue": "\"allgemein: allgemein\"",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2000,
        1040
      ],
      "id": "5f696ab5-124e-435a-b36d-5ad158931447",
      "name": "isEmailPrivat3"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1080,
        1040
      ],
      "id": "cc7a97b9-c482-412b-97e1-eee4cde700e5",
      "name": "Loop Over Items5"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        2440,
        1300
      ],
      "id": "c6ef4127-5a65-4df7-9de5-198e94f89f34",
      "name": "OpenAI Chat Model4",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1135880709,
          "mode": "list",
          "cachedResultName": "RowsToDelete",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=1135880709"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Date": "={{ $('Loop Over Items5').item.json.Date }}",
            "Time": "={{ $('Loop Over Items5').item.json.Time }}",
            "User-IP": "={{ $('Loop Over Items5').item.json['User-IP'] }}",
            "Form-Language": "={{ $('Loop Over Items5').item.json['Form-Language'] }}",
            "Salutation": "={{ $('Loop Over Items5').item.json.Salutation }}",
            "First name": "={{ $('Loop Over Items5').item.json['First name'] }}",
            "Name": "={{ $('Loop Over Items5').item.json.Name }}",
            "Company": "={{ $('Loop Over Items5').item.json.Company }}",
            "Address": "={{ $('Loop Over Items5').item.json.Address }}",
            "Country": "={{ $('Loop Over Items5').item.json.Country }}",
            "E-Mail": "={{ $('Loop Over Items5').item.json['E-Mail'] }}",
            "Newsletter": "={{ $('Loop Over Items5').item.json.Newsletter }}",
            "How did you become attentive on the pCon.planner": "={{ $('Loop Over Items5').item.json['How did you become attentive on the pCon.planner'] }}",
            "I use the pCon.planner as": "={{ $('Loop Over Items5').item.json['I use the pCon.planner as'] }}",
            "Version": "={{ $('Loop Over Items5').item.json.Version }}",
            "Edition": "={{ $('Loop Over Items5').item.json.Edition }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        3860,
        460
      ],
      "id": "e0defa7f-a9cf-46bd-be05-8faacdc75298",
      "name": "Google Sheets23",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Loop Over Items5').first().json['E-Mail'].split('@')[1].split('.')[0] }}",
        "options": {
          "systemMessage": "=You are a system that checks if an input string matches any of the following 303 company names, accounting for minor spelling errors, case insensitivity, partial matches, or variations (e.g., \"THONET GmbH\" should match \"THONET\", but \"B\u00fcro GmbH\" should not match \"ASSMANN B\u00dcROM\u00d6BEL\"). Use fuzzy matching or a similar technique to handle variations, but ensure generic terms like \"B\u00fcro GmbH\" do not incorrectly match specific company names. Return **1** if the input matches any company name, and **0** if it does not. Do not return any other output.\n\nList of company names:\n[\n \n    \"COR\", \"DHDG - Trendoffice\", \"Ondarreta\", \"Vonk\", \"DHDG - Z\u00fcco\", \"B&T Design\", \"Narbutas International\", \"Loda Mobilya\", \"Preform\", \"ZGONIC\",\n    \"Groupe Roset\", \"Prostoria\", \"Acial\", \"SCHRAMM\", \"Kotzolt International\", \"conmoto\", \"myO\", \"DHDG - Bosse\", \"Van Esch\", \"Studiotools\", \"Noti\",\n    \"Lammhults\", \"BRUNE Sitzm\u00f6bel\", \"Mikomax (Hushoffice)\", \"Ahrend\", \"Kindermann\", \"Moll System- und Funktionsm\u00f6bel\", \"Bartscher\", \"Sesta\", \"C + P M\u00f6belsysteme\",\n    \"Allermuir\", \"Ocee & Four Design\", \"FORMOEBEL\", \"Holmris B8\", \"Sono Group\", \"Franz Blaha Sitz- und B\u00fcrom\u00f6bel\", \"Akustik Office Systeme\", \"GLIMAKRA of SWEDEN\",\n    \"Vitrine Masters\", \"FREIFRAU MANUFAKTUR\", \"H\u00fcba\", \"Diemme\", \"Dileoffice\", \"WiBU ObjektPlus\", \"middel B\u00fcroeinrichtungen\", \"Dietiker\", \"Blabla-Cube\",\n    \"OFFICEPRO SEATING\", \"westermann products\", \"Kinnarps\", \"Plydesign\", \"Fellowes\", \"Martinelli Luce\", \"Casala\", \"BOX17\", \"ACTIU\", \"L&C stendal\",\n    \"Deberenn\", \"EMOBOK\", \"haworth\", \"Klain B\u00fcrom\u00f6bel GmbH\", \"AndTradition\", \"Quinti\", \"Savo Office Seating\", \"W. Schillig objects\", \"Schulte Lagertechnik\",\n    \"Nurus\", \"VASTARREDO\", \"CS Rugs\", \"Aeris\", \"silent.office.wall\", \"Schaffenburg Office Furniture\", \"CEKA\", \"String Furniture\", \"Vitra\", \"OFFECCT\",\n    \"EMU\", \"DRAENERT\", \"COLUMBIA\", \"Robberechts\", \"Et al.\", \"ROCKWOOL Rockfon\", \"SCHNEEWEISS interior Hiller Braun rosconi\", \"BINBIN\", \"Zumtobel Lighting\",\n    \"STEELBOX\", \"Ofitres\", \"SUNSET CREATION\", \"Acustio\", \"Alea\", \"FRANDSEN\", \"Cr\u00e9ation Baumann\", \"Tanaman\", \"ECHOJAZZ\", \"BakkerElkhuizen\",\n    \"Regent Beleuchtungsk\u00f6rper\", \"AB Edsbyverken\", \"STALGAST\", \"orangebox\", \"Lightnet\", \"Antrax\", \"EFKA\", \"YAASA\", \"EFG European Furniture Group\",\n    \"IKONO\", \"Herman Miller\", \"M\u00f6belwerke Prenzlau\", \"Normann Copenhagen\", \"Ege Carpets\", \"Archiutti\", \"Hammerbacher\", \"PROFIm\", \"Inclass\", \"Ego\u00e9 life\",\n    \"Alias\", \"Westaro\", \"Knoll International\", \"ANKER\", \"Fritz Hansen\", \"Sitia\", \"WeibelWeibel\", \"Texdecor\", \"JENSENplus\", \"PJ Production\", \"Cappellini\",\n    \"Arper\", \"A. & H. MEYER\", \"WERKSITZ\", \"Viccarbe\", \"LE KLINT\", \"Labofa\", \"Senator\", \"BHM\", \"CUF Milano by Centrufficio\", \"Reyem\", \"Bene\", \"Phone Alone\",\n    \"OFFICEBRICKS\", \"Swan products\", \"WINI-B\u00fcrom\u00f6bel\", \"Treston\", \"KLEINKOPF Objektm\u00f6bel\", \"ALBA CR\", \"Bejot\", \"Leyform\", \"Erich Keller\", \"Audo Copenhagen\",\n    \"Sancal\", \"Bedrunka+Hirth\", \"Dieffebi\", \"ICF\", \"BALMA\", \"Nordgr\u00f6na\", \"Abstracta\", \"SITWELL STEIFENSAND\", \"DVO\", \"Cassina\", \"k\u00fchnle'waiko\", \"PLYCOLLECTION\",\n    \"Sellex\", \"Functionals\", \"Feltouch\", \"Framery Oy\", \"SITLOSOPHY-DIVISIONE ITALIA ELLECI OFFICE\", \"Schnieder sitzt!\", \"SMV Sitz- & Objektm\u00f6bel\", \"M\u00f6belfabrik Horgenglarus\",\n    \"TRILUX\", \"Soennecken\", \"ROVO CHAIR V\u00f6lkle B\u00fcrost\u00fchle\", \"Martex\", \"CLEN\", \"Wilkhahn\", \"THONET\", \"jhs Interaktiv\", \"Mobimex\", \"Dataflex\", \"Horreds\",\n    \"Brunner (DE)\", \"Limes Raumakustik\", \"Zemp\", \"Union\", \"YOMEI\", \"Bisley\", \"Procedes i-d interior design\", \"Polyvision\", \"AGORAphil\", \"Dilinski Objekteinrichtungen\",\n    \"Richard Lampert\", \"SILEOPTA\", \"FlowerArt - styleGREEN\", \"Mebelux\", \"Brunner (FR)\", \"PAVOY GmbH Paul van Oyen\", \"OBJECT CARPET Objekt-Teppichboden\", \"UMAGE\",\n    \"Otto Kind\", \"La PODS Company\", \"Mobim\u00e9tal\", \"Nowy Styl\", \"Sokoa\", \"art aqua\", \"VARIO B\u00fcroEinrichtungen\", \"Negra\", \"VERPAN\", \"Brunner (NL)\", \"Geram\u00f6bel\",\n    \"Actiforce\", \"Kleiber\", \"ASA Plastici\", \"TOBIAS GRAU\", \"Schallsauger - Kasper\", \"Dynamobel\", \"PicnixX\", \"MIZETTO\", \"galneoscreen \u2013 wende interaktiv\", \"Visplay\",\n    \"MARELLI\", \"miinu\", \"De Sede\", \"bordbar design\", \"Mara\", \"ROPIMEX\", \"HAIDER BIOSWING\", \"CHAT BOARD\", \"Rossoacoustic-Nimbus Group\", \"F.-Martin Steifensand B\u00fcrom\u00f6bel\",\n    \"ASSMANN B\u00dcROM\u00d6BEL\", \"EOL GROUP (IRL)\", \"DOBERGO\", \"W\u00dcNSCHE\", \"FUGA Mobilya\", \"Acloud\u00ae\", \"RIM\", \"Scab\", \"366 CONCEPT\", \"Louis Poulsen Lighting\", \"ONGO\",\n    \"Conceptual Furniture Design\", \"lento\", \"HAY\", \"Alki\", \"Belux\", \"Ismobel\", \"Seledue\", \"Piaval\", \"Brunner (GB)\", \"Lapalma\", \"Mayer Manufaktur\", \"EUGEN WOLF\",\n    \"Gautier\", \"Artek\", \"Muuto\", \"Flexfurn\", \"About Office\", \"Quadrifoglio\", \"Schulte Elektrotechnik - EVOline\", \"GAPSA\", \"Interstuhl B\u00fcrom\u00f6bel\", \"Karl Kilpper\",\n    \"Milani\", \"B.PRO\", \"Midgard Licht\", \"Girsberger\", \"Gerriets\", \"Flexxica\", \"WDESIGN by Wilk\", \"VANK\", \"Pedestal\", \"Modis Interiors\", \"e15\", \"objectiv\",\n    \"Sedus B\u00fcrom\u00f6bel / Office Furniture\", \"REISS B\u00fcrom\u00f6bel\", \"Klimakustik by Beiermeister\", \"Impact Acoustic\", \"Polmarco\", \"True Design\", \"TIPTOE\", \"Schultz\",\n    \"INTUIT by Softrend\", \"Mias OC\", \"LD SEATING\", \"Silen\", \"CEHA\", \"L\u00f6ffler\", \"Montana Furniture\", \"Filex by Fellowes\", \"May Design\", \"ZEITRAUM\", \"Chairworkx\",\n    \"FLOKK\", \"GGI\", \"Boss Design\", \"Sara\", \"Kesta-Somomar\", \"ISKU\", \"EOL GROUP\", \"ACCO Brands\", \"Extremis\", \"K\u00d6HL\", \"HOWE\", \"ERGO-line by Kern Studer\",\n    \"Motiv Home\", \"NEW TENDENCY\", \"Martela\", \"bimos\", \"REXITE\", \"Mobellinea\", \"Blomus\", \"Hund Office GmbH\", \"HUSSL Sitzm\u00f6bel\", \"bndr.company\", \"Andersen Furniture\",\n    \"Vorwerk - Hamelner Teppichwerke\", \"Scan S\u00f8rlie\", \"Febr\u00fc B\u00fcrom\u00f6bel\", \"Berlin Acoustics\", \"Molto Luce\", \"Kleusberg\", \"Forma 5\", \"Dusyma Kindergartenbedarf\",\n    \"Glamox GmbH\", \"Walter Knoll\", \"FROST\", \"Julius vom Hofe\", \"Loook Industries\", \"NYINK\", \"NORR11\", \"AKABA\", \"Sch\u00f6nbuch\", \"DutchGlobe\", \"Made Design\",\n    \"M\u00fcller M\u00f6belwerkst\u00e4tten\", \"Think Paper\", \"FAMO\", \"XAL\", \"HOUE\", \"Akupanel\", \"System 180\", \"MOVING\", \"Arcchio\", \"MDF Italia | Acerbis\", \"Thorn Lighting\",\n    \"SITLOSOPHY-EXPORT DIVISION ARTE & D\", \"Herbert Waldmann\", \"Mater\", \".mdd\", \"RODET\", \"KAMO\", \"Bial Meble\", \"Echo B\u00fcrom\u00f6bel\", \"Mute Sp. z o.o.\", \"Sitek\",\n    \"EasternGraphics - Materials\", \"INNO INTERIOR\", \"Renz\", \"FLEISCHER B\u00fcrom\u00f6belwerk\", \"GRID System\", \"Rocholz\", \"VINCO \u2013 Groupe Pierre HENRY\", \"WEISH\u00c4UPL M\u00f6belwerkst\u00e4tten\",\n    \"NEWFORM UFFICIO by Aran World\", \"Festo\", \"Harmony\", \"Ergopanel\", \"Stua\", \"Vilagrasa\", \"Viasit B\u00fcrositzm\u00f6bel\", \"Taiga Concept\", \"MARO Office Furniture\",\n    \"MANADE\", \"Zurbuchen AG Amlikon\", \"Vepa\", \"EinrichtWerk\", \"HUMANSCALE International Holding IDA\", \"SMART Technologies\", \"roomours Kommunikationstools\",\n    \"TTS Transport - und Trennwand - Systeme\", \"SP\u00c4H designed acoustic\", \"hali gmbh\", \"Premium\", \"Bigla Office\", \"META-Regalbau\", \"Midj\", \"Lintex\", \"Mobboli\",\n    \"IDEAL Krug & Priester\", \"Askia Furniture\", \"ophelis\", \"BURONOMIC\", \"Goodtone\", \"FANTONI\", \"Pami\", \"DHDG - Dauphin\", \"Mex B\u00fcrom\u00f6bel\", \"Legamaster\",\n    \"Palmberg B\u00fcroeinrichtungen + Service\", \"Colebrook Bosson Saunders\", \"Mobil M\", \"Adapt\", \"Kl\u00f6ber\", \"Giroflex (Suisse)\", \"INFINITI\", \"FREZZA\", \"WUTEH\",\n    \"IB Connect\", \"OKA - B\u00fcrom\u00f6bel\", \"LAS MOBILI\", \"Treku\", \"Mobitec\", \"planm\u00f6bel.\", \"ClassiCon\", \"Artemide\", \"Vaghi\", \"WAGNER - By Topstar\", \"BOLN\", \"Resol\",\n    \"Gumpo\", \"Embru Werke (CH)\", \"Neudoerfler Office Systems\", \"magnetoplan\", \"Bralco\", \"Punt\", \"Kristalia\", \"Marset\", \"Neomounts\", \"BOSIG\", \"Embru Werke\",\n    \"Koleksiyon\", \"DESKIN\", \"Delaoliva\", \"Mauser Einrichtungssysteme\", \"NORTHERN\", \"Johanson design\", \"Caimi Brevetti\", \"Suono Acoustics\", \"Cue Solutions\",\n    \"Occony\", \"Aarsland\", \"Legrand\", \"Fameg\", \"Kastel\", \"Lista Office LO\", \"FLUFFO\", \"Theo Kerkmann B\u00fcrom\u00f6belfabrik\", \"Connection\", \"WEYEL mediasolutions\",\n    \"VENTA by B\u00fcchin Design\", \"Brunner (CH)\", \"Walter K.\", \"Chameleon by SmitVisual\", \"Occhio\", \"Leolux LX\", \"Steelcase\", \"Sigel\", \"+Halle\", \"Zilenzio\",\n    \"DeBlick\", \"Trebord\", \"Antares\", \"IBEBI\", \"Bogaerts Furniture & Lighting\", \"Ecophon Saint-Gobain\", \"Ergotron\", \"G\u00f6tessons Design Group\", \"Voortman Kantoormeubelen\",\n    \"Andreu World\", \"Pablo Designs\", \"PENDING\", \"Jakob Maul\", \"Cascando Products\", \"JGGroup\", \"Concession Europe\", \"R\u00f6thlisberger Kollektion\", \"JONAS IHREBORN\",\n    \"Wacosystems\", \"UNILUX & KOS Lighting\", \"Piure\", \"Gaber\", \"Wiesner-Hager M\u00f6bel\", \"LISTA\", \"Cube Design\", \"Novus Dahle\", \"Adeco\", \"Zens Electronics\",\n    \"ST-Systemtronic\", \"W\u00e4stberg Lighting\", \"MAGIS\", \"Slalom\", \"Artifort\", \"SilentLab\", \"Stukenbr\u00f6ker + Rollmann\", \"Kusch+Co\", \"Genexco\", \"DURABLE Hunke & Jochheim\",\n    \"ECOcero\", \"ALBRECHT JUNG\", \"Svenheim Office\", \"Entrance\", \"Variand Furniture\", \"Fermob & Vlaemynck\", \"LEUWICO\", \"Bulo\", \"K\u00f6nig + Neurath\", \"TEMPO BY DIGITEX\",\n    \"B\u00fcrotime\", \"Limobel\", \"accodo Projekt\", \"werner works\", \"Ergodata\", \"K&S Grossk\u00fcchenbibliothek\", \"Sitland\", \"Guialmi\", \"Scholl Apparatebau\", \"Moravia\",\n    \"Marbet\", \"Bachmann\", \"Thur Metall\", \"Eurosit\", \"Studiobricks Acoustic Booths\", \"ARTECK DESIGN\", \"Arrow Group\", \"fm B\u00fcrom\u00f6bel Franz Meyer\", \"ERIDES\",\n    \"Cegim\", \"Expormim\", \"Sitag\", \"FURNITURE FOR GOOD\", \"BuzziSpace\", \"Ragnars\", \"Fumac\", \"EOL GROUP (UK)\", \"Spiegels\", \"Fr\u00f6scher\", \"Mauser Sitzkultur\",\n    \"Markant Office Furniture\", \"2WorkFromX\", \"Gottardo LED\"\n]\n\n\nInstructions:\n1. Compare the input string to the list of company names using a fuzzy matching algorithm or similar technique (e.g., Levenshtein distance, partial string matching).\n2. Consider the following for matching:\n   - Ignore case (e.g., \"thonet\" matches \"THONET\").\n   - Allow minor spelling errors (e.g., \"THOENT\" matches \"THONET\").\n   - Allow additional words like \"GmbH\", \"AG\", \"Ltd\", etc. (e.g., \"THONET GmbH\" matches \"THONET\").\n   - Allow partial matches for the core company name (e.g., \"Zumtobel\" matches \"Zumtobel Lighting\").\n   - Exclude generic terms like \"B\u00fcro GmbH\", \"Office GmbH\", or \"M\u00f6bel AG\" unless they are part of a specific company name (e.g., \"B\u00fcro GmbH\" should not match \"ASSMANN B\u00dcROM\u00d6BEL\").\n3. Return **1** if the input matches any company name in the list based on the above criteria.\n4. Return **0** if the input does not match any company name.\n5. Do not return any other output, explanation, or text."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        2820,
        440
      ],
      "id": "e5e9e1a2-da67-4d20-b04d-8d034e48a146",
      "name": "AI Agent13",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $('AI Agent13').first().json.output }}",
              "rightValue": "1",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3340,
        500
      ],
      "id": "f1ff036a-3e84-4eb1-9e2c-952824ef6274",
      "name": "If13"
    },
    {
      "parameters": {
        "content": "# Is Already partner advanced",
        "height": 1580,
        "width": 6720
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        80
      ],
      "typeVersion": 1,
      "id": "082d3b07-059e-463c-a6c9-969ae31545ea",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Loop Over Items5').first().json.Company }}",
        "options": {
          "systemMessage": "You are a system that checks if an input string matches any of the following 303 company names, accounting for minor spelling errors, case insensitivity, partial matches, or variations (e.g., \"THONET GmbH\" should match \"THONET\", but \"B\u00fcro GmbH\" should not match \"ASSMANN B\u00dcROM\u00d6BEL\"). Use fuzzy matching or a similar technique to handle variations, but ensure generic terms like \"B\u00fcro GmbH\" do not incorrectly match specific company names. Return **1** if the input matches any company name, and **0** if it does not. Do not return any other output.\n\nList of company names:\n[\n \n    \"COR\", \"DHDG - Trendoffice\", \"Ondarreta\", \"Vonk\", \"DHDG - Z\u00fcco\", \"B&T Design\", \"Narbutas International\", \"Loda Mobilya\", \"Preform\", \"ZGONIC\",\n    \"Groupe Roset\", \"Prostoria\", \"Acial\", \"SCHRAMM\", \"Kotzolt International\", \"conmoto\", \"myO\", \"DHDG - Bosse\", \"Van Esch\", \"Studiotools\", \"Noti\",\n    \"Lammhults\", \"BRUNE Sitzm\u00f6bel\", \"Mikomax (Hushoffice)\", \"Ahrend\", \"Kindermann\", \"Moll System- und Funktionsm\u00f6bel\", \"Bartscher\", \"Sesta\", \"C + P M\u00f6belsysteme\",\n    \"Allermuir\", \"Ocee & Four Design\", \"FORMOEBEL\", \"Holmris B8\", \"Sono Group\", \"Franz Blaha Sitz- und B\u00fcrom\u00f6bel\", \"Akustik Office Systeme\", \"GLIMAKRA of SWEDEN\",\n    \"Vitrine Masters\", \"FREIFRAU MANUFAKTUR\", \"H\u00fcba\", \"Diemme\", \"Dileoffice\", \"WiBU ObjektPlus\", \"middel B\u00fcroeinrichtungen\", \"Dietiker\", \"Blabla-Cube\",\n    \"OFFICEPRO SEATING\", \"westermann products\", \"Kinnarps\", \"Plydesign\", \"Fellowes\", \"Martinelli Luce\", \"Casala\", \"BOX17\", \"ACTIU\", \"L&C stendal\",\n    \"Deberenn\", \"EMOBOK\", \"haworth\", \"Klain B\u00fcrom\u00f6bel GmbH\", \"AndTradition\", \"Quinti\", \"Savo Office Seating\", \"W. Schillig objects\", \"Schulte Lagertechnik\",\n    \"Nurus\", \"VASTARREDO\", \"CS Rugs\", \"Aeris\", \"silent.office.wall\", \"Schaffenburg Office Furniture\", \"CEKA\", \"String Furniture\", \"Vitra\", \"OFFECCT\",\n    \"EMU\", \"DRAENERT\", \"COLUMBIA\", \"Robberechts\", \"Et al.\", \"ROCKWOOL Rockfon\", \"SCHNEEWEISS interior Hiller Braun rosconi\", \"BINBIN\", \"Zumtobel Lighting\",\n    \"STEELBOX\", \"Ofitres\", \"SUNSET CREATION\", \"Acustio\", \"Alea\", \"FRANDSEN\", \"Cr\u00e9ation Baumann\", \"Tanaman\", \"ECHOJAZZ\", \"BakkerElkhuizen\",\n    \"Regent Beleuchtungsk\u00f6rper\", \"AB Edsbyverken\", \"STALGAST\", \"orangebox\", \"Lightnet\", \"Antrax\", \"EFKA\", \"YAASA\", \"EFG European Furniture Group\",\n    \"IKONO\", \"Herman Miller\", \"M\u00f6belwerke Prenzlau\", \"Normann Copenhagen\", \"Ege Carpets\", \"Archiutti\", \"Hammerbacher\", \"PROFIm\", \"Inclass\", \"Ego\u00e9 life\",\n    \"Alias\", \"Westaro\", \"Knoll International\", \"ANKER\", \"Fritz Hansen\", \"Sitia\", \"WeibelWeibel\", \"Texdecor\", \"JENSENplus\", \"PJ Production\", \"Cappellini\",\n    \"Arper\", \"A. & H. MEYER\", \"WERKSITZ\", \"Viccarbe\", \"LE KLINT\", \"Labofa\", \"Senator\", \"BHM\", \"CUF Milano by Centrufficio\", \"Reyem\", \"Bene\", \"Phone Alone\",\n    \"OFFICEBRICKS\", \"Swan products\", \"WINI-B\u00fcrom\u00f6bel\", \"Treston\", \"KLEINKOPF Objektm\u00f6bel\", \"ALBA CR\", \"Bejot\", \"Leyform\", \"Erich Keller\", \"Audo Copenhagen\",\n    \"Sancal\", \"Bedrunka+Hirth\", \"Dieffebi\", \"ICF\", \"BALMA\", \"Nordgr\u00f6na\", \"Abstracta\", \"SITWELL STEIFENSAND\", \"DVO\", \"Cassina\", \"k\u00fchnle'waiko\", \"PLYCOLLECTION\",\n    \"Sellex\", \"Functionals\", \"Feltouch\", \"Framery Oy\", \"SITLOSOPHY-DIVISIONE ITALIA ELLECI OFFICE\", \"Schnieder sitzt!\", \"SMV Sitz- & Objektm\u00f6bel\", \"M\u00f6belfabrik Horgenglarus\",\n    \"TRILUX\", \"Soennecken\", \"ROVO CHAIR V\u00f6lkle B\u00fcrost\u00fchle\", \"Martex\", \"CLEN\", \"Wilkhahn\", \"THONET\", \"jhs Interaktiv\", \"Mobimex\", \"Dataflex\", \"Horreds\",\n    \"Brunner (DE)\", \"Limes Raumakustik\", \"Zemp\", \"Union\", \"YOMEI\", \"Bisley\", \"Procedes i-d interior design\", \"Polyvision\", \"AGORAphil\", \"Dilinski Objekteinrichtungen\",\n    \"Richard Lampert\", \"SILEOPTA\", \"FlowerArt - styleGREEN\", \"Mebelux\", \"Brunner (FR)\", \"PAVOY GmbH Paul van Oyen\", \"OBJECT CARPET Objekt-Teppichboden\", \"UMAGE\",\n    \"Otto Kind\", \"La PODS Company\", \"Mobim\u00e9tal\", \"Nowy Styl\", \"Sokoa\", \"art aqua\", \"VARIO B\u00fcroEinrichtungen\", \"Negra\", \"VERPAN\", \"Brunner (NL)\", \"Geram\u00f6bel\",\n    \"Actiforce\", \"Kleiber\", \"ASA Plastici\", \"TOBIAS GRAU\", \"Schallsauger - Kasper\", \"Dynamobel\", \"PicnixX\", \"MIZETTO\", \"galneoscreen \u2013 wende interaktiv\", \"Visplay\",\n    \"MARELLI\", \"miinu\", \"De Sede\", \"bordbar design\", \"Mara\", \"ROPIMEX\", \"HAIDER BIOSWING\", \"CHAT BOARD\", \"Rossoacoustic-Nimbus Group\", \"F.-Martin Steifensand B\u00fcrom\u00f6bel\",\n    \"ASSMANN B\u00dcROM\u00d6BEL\", \"EOL GROUP (IRL)\", \"DOBERGO\", \"W\u00dcNSCHE\", \"FUGA Mobilya\", \"Acloud\u00ae\", \"RIM\", \"Scab\", \"366 CONCEPT\", \"Louis Poulsen Lighting\", \"ONGO\",\n    \"Conceptual Furniture Design\", \"lento\", \"HAY\", \"Alki\", \"Belux\", \"Ismobel\", \"Seledue\", \"Piaval\", \"Brunner (GB)\", \"Lapalma\", \"Mayer Manufaktur\", \"EUGEN WOLF\",\n    \"Gautier\", \"Artek\", \"Muuto\", \"Flexfurn\", \"About Office\", \"Quadrifoglio\", \"Schulte Elektrotechnik - EVOline\", \"GAPSA\", \"Interstuhl B\u00fcrom\u00f6bel\", \"Karl Kilpper\",\n    \"Milani\", \"B.PRO\", \"Midgard Licht\", \"Girsberger\", \"Gerriets\", \"Flexxica\", \"WDESIGN by Wilk\", \"VANK\", \"Pedestal\", \"Modis Interiors\", \"e15\", \"objectiv\",\n    \"Sedus B\u00fcrom\u00f6bel / Office Furniture\", \"REISS B\u00fcrom\u00f6bel\", \"Klimakustik by Beiermeister\", \"Impact Acoustic\", \"Polmarco\", \"True Design\", \"TIPTOE\", \"Schultz\",\n    \"INTUIT by Softrend\", \"Mias OC\", \"LD SEATING\", \"Silen\", \"CEHA\", \"L\u00f6ffler\", \"Montana Furniture\", \"Filex by Fellowes\", \"May Design\", \"ZEITRAUM\", \"Chairworkx\",\n    \"FLOKK\", \"GGI\", \"Boss Design\", \"Sara\", \"Kesta-Somomar\", \"ISKU\", \"EOL GROUP\", \"ACCO Brands\", \"Extremis\", \"K\u00d6HL\", \"HOWE\", \"ERGO-line by Kern Studer\",\n    \"Motiv Home\", \"NEW TENDENCY\", \"Martela\", \"bimos\", \"REXITE\", \"Mobellinea\", \"Blomus\", \"Hund Office GmbH\", \"HUSSL Sitzm\u00f6bel\", \"bndr.company\", \"Andersen Furniture\",\n    \"Vorwerk - Hamelner Teppichwerke\", \"Scan S\u00f8rlie\", \"Febr\u00fc B\u00fcrom\u00f6bel\", \"Berlin Acoustics\", \"Molto Luce\", \"Kleusberg\", \"Forma 5\", \"Dusyma Kindergartenbedarf\",\n    \"Glamox GmbH\", \"Walter Knoll\", \"FROST\", \"Julius vom Hofe\", \"Loook Industries\", \"NYINK\", \"NORR11\", \"AKABA\", \"Sch\u00f6nbuch\", \"DutchGlobe\", \"Made Design\",\n    \"M\u00fcller M\u00f6belwerkst\u00e4tten\", \"Think Paper\", \"FAMO\", \"XAL\", \"HOUE\", \"Akupanel\", \"System 180\", \"MOVING\", \"Arcchio\", \"MDF Italia | Acerbis\", \"Thorn Lighting\",\n    \"SITLOSOPHY-EXPORT DIVISION ARTE & D\", \"Herbert Waldmann\", \"Mater\", \".mdd\", \"RODET\", \"KAMO\", \"Bial Meble\", \"Echo B\u00fcrom\u00f6bel\", \"Mute Sp. z o.o.\", \"Sitek\",\n    \"EasternGraphics - Materials\", \"INNO INTERIOR\", \"Renz\", \"FLEISCHER B\u00fcrom\u00f6belwerk\", \"GRID System\", \"Rocholz\", \"VINCO \u2013 Groupe Pierre HENRY\", \"WEISH\u00c4UPL M\u00f6belwerkst\u00e4tten\",\n    \"NEWFORM UFFICIO by Aran World\", \"Festo\", \"Harmony\", \"Ergopanel\", \"Stua\", \"Vilagrasa\", \"Viasit B\u00fcrositzm\u00f6bel\", \"Taiga Concept\", \"MARO Office Furniture\",\n    \"MANADE\", \"Zurbuchen AG Amlikon\", \"Vepa\", \"EinrichtWerk\", \"HUMANSCALE International Holding IDA\", \"SMART Technologies\", \"roomours Kommunikationstools\",\n    \"TTS Transport - und Trennwand - Systeme\", \"SP\u00c4H designed acoustic\", \"hali gmbh\", \"Premium\", \"Bigla Office\", \"META-Regalbau\", \"Midj\", \"Lintex\", \"Mobboli\",\n    \"IDEAL Krug & Priester\", \"Askia Furniture\", \"ophelis\", \"BURONOMIC\", \"Goodtone\", \"FANTONI\", \"Pami\", \"DHDG - Dauphin\", \"Mex B\u00fcrom\u00f6bel\", \"Legamaster\",\n    \"Palmberg B\u00fcroeinrichtungen + Service\", \"Colebrook Bosson Saunders\", \"Mobil M\", \"Adapt\", \"Kl\u00f6ber\", \"Giroflex (Suisse)\", \"INFINITI\", \"FREZZA\", \"WUTEH\",\n    \"IB Connect\", \"OKA - B\u00fcrom\u00f6bel\", \"LAS MOBILI\", \"Treku\", \"Mobitec\", \"planm\u00f6bel.\", \"ClassiCon\", \"Artemide\", \"Vaghi\", \"WAGNER - By Topstar\", \"BOLN\", \"Resol\",\n    \"Gumpo\", \"Embru Werke (CH)\", \"Neudoerfler Office Systems\", \"magnetoplan\", \"Bralco\", \"Punt\", \"Kristalia\", \"Marset\", \"Neomounts\", \"BOSIG\", \"Embru Werke\",\n    \"Koleksiyon\", \"DESKIN\", \"Delaoliva\", \"Mauser Einrichtungssysteme\", \"NORTHERN\", \"Johanson design\", \"Caimi Brevetti\", \"Suono Acoustics\", \"Cue Solutions\",\n    \"Occony\", \"Aarsland\", \"Legrand\", \"Fameg\", \"Kastel\", \"Lista Office LO\", \"FLUFFO\", \"Theo Kerkmann B\u00fcrom\u00f6belfabrik\", \"Connection\", \"WEYEL mediasolutions\",\n    \"VENTA by B\u00fcchin Design\", \"Brunner (CH)\", \"Walter K.\", \"Chameleon by SmitVisual\", \"Occhio\", \"Leolux LX\", \"Steelcase\", \"Sigel\", \"+Halle\", \"Zilenzio\",\n    \"DeBlick\", \"Trebord\", \"Antares\", \"IBEBI\", \"Bogaerts Furniture & Lighting\", \"Ecophon Saint-Gobain\", \"Ergotron\", \"G\u00f6tessons Design Group\", \"Voortman Kantoormeubelen\",\n    \"Andreu World\", \"Pablo Designs\", \"PENDING\", \"Jakob Maul\", \"Cascando Products\", \"JGGroup\", \"Concession Europe\", \"R\u00f6thlisberger Kollektion\", \"JONAS IHREBORN\",\n    \"Wacosystems\", \"UNILUX & KOS Lighting\", \"Piure\", \"Gaber\", \"Wiesner-Hager M\u00f6bel\", \"LISTA\", \"Cube Design\", \"Novus Dahle\", \"Adeco\", \"Zens Electronics\",\n    \"ST-Systemtronic\", \"W\u00e4stberg Lighting\", \"MAGIS\", \"Slalom\", \"Artifort\", \"SilentLab\", \"Stukenbr\u00f6ker + Rollmann\", \"Kusch+Co\", \"Genexco\", \"DURABLE Hunke & Jochheim\",\n    \"ECOcero\", \"ALBRECHT JUNG\", \"Svenheim Office\", \"Entrance\", \"Variand Furniture\", \"Fermob & Vlaemynck\", \"LEUWICO\", \"Bulo\", \"K\u00f6nig + Neurath\", \"TEMPO BY DIGITEX\",\n    \"B\u00fcrotime\", \"Limobel\", \"accodo Projekt\", \"werner works\", \"Ergodata\", \"K&S Grossk\u00fcchenbibliothek\", \"Sitland\", \"Guialmi\", \"Scholl Apparatebau\", \"Moravia\",\n    \"Marbet\", \"Bachmann\", \"Thur Metall\", \"Eurosit\", \"Studiobricks Acoustic Booths\", \"ARTECK DESIGN\", \"Arrow Group\", \"fm B\u00fcrom\u00f6bel Franz Meyer\", \"ERIDES\",\n    \"Cegim\", \"Expormim\", \"Sitag\", \"FURNITURE FOR GOOD\", \"BuzziSpace\", \"Ragnars\", \"Fumac\", \"EOL GROUP (UK)\", \"Spiegels\", \"Fr\u00f6scher\", \"Mauser Sitzkultur\",\n    \"Markant Office Furniture\", \"2WorkFromX\", \"Gottardo LED\"\n]\n\nInstructions:\n1. Compare the input string to the list of company names using a fuzzy matching algorithm or similar technique (e.g., Levenshtein distance, partial string matching).\n2. Consider the following for matching:\n   - Ignore case (e.g., \"thonet\" matches \"THONET\").\n   - Allow minor spelling errors (e.g., \"THOENT\" matches \"THONET\").\n   - Allow additional words like \"GmbH\", \"AG\", \"Ltd\", etc. (e.g., \"THONET GmbH\" matches \"THONET\").\n   - Allow partial matches for the core company name (e.g., \"Zumtobel\" matches \"Zumtobel Lighting\").\n   - Exclude generic terms like \"B\u00fcro GmbH\", \"Office GmbH\", or \"M\u00f6bel AG\" unless they are part of a specific company name (e.g., \"B\u00fcro GmbH\" should not match \"ASSMANN B\u00dcROM\u00d6BEL\").\n3. Return **1** if the input matches any company name in the list based on the above criteria.\n4. Return **0** if the input does not match any company name.\n5. Do not return any other output, explanation, or text."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        2820,
        1000
      ],
      "id": "0307954f-4d08-4a9c-aebc-f612fc95609c",
      "name": "AI Agent14",
      "retryOnFail": false,
      "executeOnce": true,
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "amount": 1
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        4960,
        1000
      ],
      "id": "33e33a60-42b5-4870-a47d-fc57c3e35854",
      "name": "Wait4"
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "isPrivatUser"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        120,
        1020
      ],
      "id": "64567c5d-9444-4ffb-93ba-e83f9c939a1a",
      "name": "deletePrivatUsers"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "dc6035de-28b8-4a1f-a7a6-89fec3f568f3",
              "name": "url",
              "value": "https://script.google.com/macros/s/AKfycby8tCQNpr0UT9-STVbn8MNVAoc8AXoDNSeZzlM6244QUvq4tQxBUMRapMRT-vP-B_s4NA/exec",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -640,
        1020
      ],
      "id": "8bd7b803-a2b7-4eba-ba16-a806a797f90f",
      "name": "setScriptUrl"
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "isAlreadyPartnerCompany"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -320,
        1020
      ],
      "id": "bc27e4a4-6d5b-435b-a738-b044539c2eec",
      "name": "deletePartnersByCompany"
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "isAlreadyPartnerEmail"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -100,
        1020
      ],
      "id": "b2bd43ad-92b2-423b-a776-c3302435d52e",
      "name": "isAlreadyPartnerEmail"
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "noPhoneNumber"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2320,
        7720
      ],
      "id": "c1113092-36a7-421d-a219-51edd1cab07b",
      "name": "deleteNoPhoneNumbers",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ \n  $('Loop Over Items6').first().json['Company'] || 'Kein Company-Name' \n}}  \n{{ \n  (() => {\n    const raw = $('Loop Over Items6').first().json?.Address || '';\n    const match = raw.match(/\\b\\d{5}\\b/);\n    return match ? match[0] : '';\n  })() \n}} {{ $('Loop Over Items6').first().json.Country }} telefonnummer\n"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-KEY",
              "value": "4ff0d5d9bf4ba4ca7779a75c034f12fbf1fd8e92"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4340,
        5140
      ],
      "id": "86acab72-6edb-4bb8-983e-493366b586de",
      "name": "HTTP Request9"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Replace Me6",
      "typeVersion": 1,
      "position": [
        7020,
        6020
      ],
      "id": "f2681f8b-b328-48eb-a69d-ca79e7bd776c"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        4540,
        5880
      ],
      "id": "338269ba-7fe6-4109-a78d-83cb5444800a",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.answerBox.title }} {{ $json.answerBox.answer }};;; {{ $json.organic[0].title }}{{ $json.organic[0].snippet }};;;{{ $json.organic[2].title }}{{ $json.organic[2].snippet }};;;{{ $json.organic[3].title }}{{ $json.organic[3].snippet }};;;",
        "options": {
          "systemMessage": "=Du bist ein spezialisierter Filter f\u00fcr Telefonnummern von Firmen. Deine Aufgabe ist es, die Telefonnummer der Firma {{ $('Loop Over Items6').first().json.Company }} in {{ $('Loop Over Items6')?.first()?.json.Address && $('Loop Over Items6')?.first()?.json.Address.match(/,\\s*(.*)/) ? $('Loop Over Items6')?.first()?.json.Address.match(/,\\s*(.*)/)[1] : '' }}\n {{ $('Loop Over Items6').first().json.Country }} aus den gegebenen Suchergebnissen zu extrahieren. \n\n## Regeln:\n1. Die Suchergebnisse sind durch `;;;` getrennt.\n2. Gib nur die Telefonnummer aus dem ersten Ergebnis zur\u00fcck, falls sie vorhanden ist. Falls im ersten Ergebnis keine g\u00fcltige Telefonnummer enthalten ist, suche im zweiten.\n3. Stelle sicher, dass die gefundene Telefonnummer auch wirklich der Firma {{ \n  $('Loop Over Items6').first().json['Company'] || 'Kein Company-Name' \n}}  \n{{ \n  (() => {\n    const raw = $('Loop Over Items6').item.json?.Address || '';\n    const match = raw.match(/\\b\\d{5}\\b/);\n    return match ? match[0] : '';\n  })() \n}} {{ $('Loop Over Items6').item.json.Country }} zugeordnet ist. Achte besonders darauf, dass die Telefonnummer aus einer verl\u00e4sslichen Quelle stammt und der Firma zugeordnet werden kann.\n4. Wenn keine g\u00fcltige Telefonnummer gefunden wird, gib none zur\u00fcck.\n\nGib nur die Telefonnummer zur\u00fcck mit zwei einzigen kurzen worten das beschreibt wo du sie gefunden hast und zu wem sie geh\u00f6rt. Wenn du dazu keine Information hast schreibe \"allgemein\". Keine weiteren Informationen. z.B.\nAnna Schuhmann: +49 44040033003\nallgemein: 40400404\n\nwenn du keine passende Telefonnummer findest gebe nur none zurr\u00fcck und sonst nichts "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        4540,
        5140
      ],
      "id": "fba20c5e-6c76-4d95-a043-2da7bd12e068",
      "name": "AI Agent15",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $json.output }}",
              "rightValue": "none",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        5020,
        5140
      ],
      "id": "b851b10d-9fc9-4555-93bc-a4fc11534dee",
      "name": "If14"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        920,
        6040
      ],
      "id": "e8330304-3c12-4cdf-95fe-8d74d294a70a",
      "name": "Google Sheets",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6c478565-ae01-4b2d-878f-b2f53ce7d86a",
              "leftValue": "={{ $('Loop Over Items6').first().json.CompanyPhone }}",
              "rightValue": "\"allgemein: allgemein\"",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2700,
        6040
      ],
      "id": "aa48ae6e-119e-414c-8591-f2cd03050822",
      "name": "isEmailPrivat"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "a9df6e10-1820-4457-b950-e078d45ff0fe",
              "leftValue": "={{ $('Loop Over Items6').first().json.Company.toString() }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3420,
        5260
      ],
      "id": "b66a259c-65bd-4c1c-8930-f1c879043a43",
      "name": "If15"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1200,
        6040
      ],
      "id": "52d8d275-b787-441b-8c33-bb2412a7874f",
      "name": "Loop Over Items6"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ \n  $('Loop Over Items6').first().json['E-Mail'] \n    ? $('Loop Over Items6').first().json['E-Mail'].split(\"@\")[1] \n    : '' \n}} {{ (() => {\n    const raw = $('Loop Over Items6').first().json?.Address || '';\n    const match = raw.match(/\\b\\d{5}\\b/);\n    return match ? match[0] : '';\n  })() \n}} {{ $('Loop Over Items6').first().json.Country }} telefonnummer \n"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-KEY",
              "value": "4ff0d5d9bf4ba4ca7779a75c034f12fbf1fd8e92"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4340,
        5380
      ],
      "id": "f8f6ab74-4468-4258-a0b8-53813c631967",
      "name": "HTTP Request10"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.answerBox.title }} {{ $json.answerBox.answer }};;; {{ $json.organic[0].title }}{{ $json.organic[0].snippet }};;;{{ $json.organic[2].title }}{{ $json.organic[2].snippet }};;;{{ $json.organic[3].title }}{{ $json.organic[3].snippet }};;;",
        "options": {
          "systemMessage": "=Du bist ein spezialisierter Filter f\u00fcr Telefonnummern von Firmen. Deine Aufgabe ist es, die Telefonnummer der Firma {{ $('Loop Over Items6').first().json.Company }} in {{ $('Loop Over Items6')?.first()?.json.Address && $('Loop Over Items6')?.first()?.json.Address.match(/,\\s*(.*)/) ? $('Loop Over Items6')?.first()?.json.Address.match(/,\\s*(.*)/)[1] : '' }}\n {{ $('Loop Over Items6').first().json.Country }} aus den gegebenen Suchergebnissen zu extrahieren. \n\n## Regeln:\n1. Die Suchergebnisse sind durch `;;;` getrennt.\n2. Gib nur die Telefonnummer aus dem ersten Ergebnis zur\u00fcck, falls sie vorhanden ist. Falls im ersten Ergebnis keine g\u00fcltige Telefonnummer enthalten ist, suche im zweiten.{{ \n  $('Loop Over Items6').first().json['E-Mail'] \n    ? $('Loop Over Items6').item.json['E-Mail'].split(\"@\")[1] \n    : '' \n}} {{ (() => {\n    const raw = $('Loop Over Items6').first().json?.Address || '';\n    const match = raw.match(/\\b\\d{5}\\b/);\n    return match ? match[0] : '';\n  })() \n}}  {{ $('Loop Over Items6').item.json.Country }}\n zugeordnet ist. Achte besonders darauf, dass die Telefonnummer aus einer verl\u00e4sslichen Quelle stammt und der Firma zugeordnet werden kann.\n4. Wenn keine g\u00fcltige Telefonnummer gefunden wird, gib none zur\u00fcck.\n\nGib nur die Telefonnummer zur\u00fcck mit zwei einzigen kurzen worten das beschreibt wo du sie gefunden hast und zu wem sie geh\u00f6rt. Wenn du dazu keine Information hast schreibe \"allgemein\". Keine weiteren Informationen. z.B.\nAnna Schuhmann: +49 44040033003\nallgemein: 40400404\n\nwenn du keine passende Telefonnummer findest gebe nur none zurr\u00fcck und sonst nichts \n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        4640,
        5400
      ],
      "id": "69edb6fe-7cd6-4ba8-a35a-c0015f4be4bf",
      "name": "AI Agent16",
      "alwaysOutputData": true,
      "executeOnce": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $json.output }}",
              "rightValue": "none",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        5020,
        5380
      ],
      "id": "39f62f43-58d7-4c56-a5d6-2ac6e47130c6",
      "name": "If16"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Loop Over Items6').first().json.row_number}}",
            "CompanyPhone": "={{ JSON.stringify($('AI Agent16').first().json.output) }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CompanyPhone",
              "displayName": "CompanyPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        5540,
        5360
      ],
      "id": "c6be0a7b-f370-44f7-b83b-2ab590113d85",
      "name": "Google Sheets18",
      "executeOnce": true,
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "# Find company phonenumber in Impressum or on Website\n\n",
        "height": 1220,
        "width": 6700,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        6280
      ],
      "typeVersion": 1,
      "id": "8ccc39e1-118d-46c7-8337-e65305741c25",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# Find company phonenumber by google search\n\n",
        "height": 1220,
        "width": 6700,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        5080
      ],
      "typeVersion": 1,
      "id": "e885bd41-e093-4faf-afc7-88eaabdb31e4",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Loop Over Items6').first().json.row_number}}",
            "CompanyPhone": "={{ JSON.stringify($('AI Agent15').first().json.output) }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CompanyPhone",
              "displayName": "CompanyPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        5660,
        5140
      ],
      "id": "19dd0bb5-f014-4249-92ff-6a3ce8464bf5",
      "name": "Google Sheets24",
      "executeOnce": true,
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        3020,
        3220
      ],
      "id": "32e3c0f5-9f40-4239-ad59-892f2eae2e1d",
      "name": "OpenAI Chat Model2",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "sortSheet"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2580,
        7720
      ],
      "id": "f8937612-10d6-498b-bfb8-d43cfb4cbf1c",
      "name": "sortSheet",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "amount": 60
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        20,
        2680
      ],
      "id": "6eaf8b35-c540-4cba-bcb2-e8c0c4b5db86",
      "name": "Wait"
    },
    {
      "parameters": {
        "amount": 300
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        600,
        4300
      ],
      "id": "86cafe65-b50c-4876-a635-5df49959665c",
      "name": "Wait1"
    },
    {
      "parameters": {
        "amount": 60
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        660,
        6040
      ],
      "id": "6dcc1cc9-0f05-4b2b-a65d-17e4c228ea11",
      "name": "Wait5"
    },
    {
      "parameters": {
        "amount": 60
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        620,
        7140
      ],
      "id": "1d0d6ec5-040b-44f5-871f-e6a1acadfbd1",
      "name": "Wait6"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1135880709,
          "mode": "list",
          "cachedResultName": "RowsToDelete",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=1135880709"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Date": "={{ $('Loop Over Items5').item.json.Date }}",
            "Time": "={{ $('Loop Over Items5').item.json.Time }}",
            "User-IP": "={{ $('Loop Over Items5').item.json['User-IP'] }}",
            "Form-Language": "={{ $('Loop Over Items5').item.json['Form-Language'] }}",
            "Salutation": "={{ $('Loop Over Items5').item.json.Salutation }}",
            "First name": "={{ $('Loop Over Items5').item.json['First name'] }}",
            "Name": "={{ $('Loop Over Items5').item.json.Name }}",
            "Company": "={{ $('Loop Over Items5').item.json.Company }}",
            "Address": "={{ $('Loop Over Items5').item.json.Address }}",
            "Country": "={{ $('Loop Over Items5').item.json.Country }}",
            "E-Mail": "={{ $('Loop Over Items5').item.json['E-Mail'] }}",
            "Newsletter": "={{ $('Loop Over Items5').item.json.Newsletter }}",
            "How did you become attentive on the pCon.planner": "={{ $('Loop Over Items5').item.json['How did you become attentive on the pCon.planner'] }}",
            "I use the pCon.planner as": "={{ $('Loop Over Items5').item.json['I use the pCon.planner as'] }}",
            "Version": "={{ $('Loop Over Items5').item.json.Version }}",
            "Edition": "={{ $('Loop Over Items5').item.json.Edition }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        3780,
        920
      ],
      "id": "81bef5f6-e4e2-4aa5-a1c7-29c7e25fdeda",
      "name": "Google Sheets25",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $('AI Agent14').first().json.output }}",
              "rightValue": "1",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3280,
        1000
      ],
      "id": "76bccaea-dd57-4943-84ba-6b1161ea1ecb",
      "name": "If17"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "E-Mail": "={{ $('Loop Over Items').first().json['E-Mail'] }}",
            "branche": "={{ $('AI Agent9').first().json.output }}"
          },
          "matchingColumns": [
            "E-Mail"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        4120,
        2560
      ],
      "id": "ff181693-3d2d-4a90-a5f8-772c86c3a2eb",
      "name": "Google Sheets2",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "E-Mail": "={{ $('Loop Over Items').first().json['E-Mail'] }}",
            "branche": "={{ $('AI Agent1').first().json.output }}"
          },
          "matchingColumns": [
            "E-Mail"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CompanyPhone",
              "displayName": "CompanyPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        4140,
        2220
      ],
      "id": "0a6a05e9-adc2-4fe0-bbae-69419faa701a",
      "name": "Google Sheets4",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6c478565-ae01-4b2d-878f-b2f53ce7d86a",
              "leftValue": "={{ $('Loop Over Items').first().json['E-Mail'].toString() }}",
              "rightValue": "^[\\w\\.-]+@(gmail|t\\-online|cloud|ooglemail|test|googlemail|yahoo|ymail|rocketmail|hotmail|outlook|live|msn|icloud|me|mac|aol|mail|zoho|gmx|web|t-online|freenet|email|arcor|vodafone|alice|versanet|kabelmail|online|ewetel|protonmail|proton|tutanota|posteo|runbox|mailfence|startmail|fastmail|hushmail|mailbox|bluewin|sunrise|swissonline|hispeed|laposte|libero|tin|seznam|mail\\.ru|yandex|inbox\\.ru|bk\\.ru|list\\.ru|qq|126|163|sina|naver|daum|gawab|cox|comcast|bellsouth|verizon|berlin|aon|inode|chello|utanet|tele2|eduhi|liwest|netcologne|example|seml|mailinator|pm|clonemailsieure|anonymous|duck)\\.[a-zA-Z]{2,}$",
              "operator": {
                "type": "string",
                "operation": "regex"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1720,
        2740
      ],
      "id": "a3323f93-05e7-412f-88be-37bab0f69142",
      "name": "isEmailPrivat4"
    },
    {
      "parameters": {
        "url": "={{ $('Loop Over Items').first().json['E-Mail'] ? \"http://www.\" + $('Loop Over Items').first().json['E-Mail'].split(\"@\")[1] : '' }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2260,
        2700
      ],
      "id": "c4f07a34-36cf-4911-a0e0-b4b8bd23ae09",
      "name": "HTTP Request5",
      "alwaysOutputData": false,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "jsCode": "// Zugriff auf die HTML-Daten aus der Eingabevariable\nconst htmlContent = $('HTTP Request5').first().json.data;\n\n// Funktion zum Entfernen von HTML-Tags, JavaScript, CSS und Bereinigen des Textes\nfunction cleanHtml(html) {\n  // Entferne <script> und <style> Tags samt Inhalt\n  html = html.replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '');\n  html = html.replace(/<style\\b[^<]*(?:(?!<\\/style>)<[^<]*)*<\\/style>/gi, '');\n  \n  // Entferne alle HTML-Tags, behalte den Text dazwischen\n  html = html.replace(/<[^>]+>/g, '');\n  \n  // Entferne \u00fcberfl\u00fcssige Leerzeichen, Tabs und Zeilenumbr\u00fcche\n  html = html.replace(/\\s+/g, ' ').trim();\n  \n  // Entferne HTML-Entities (z. B. \u00a0, &)\n  html = html.replace(/&[a-zA-Z0-9#]+;/g, '');\n\n  return html;\n}\n\n// Funktion zum Komprimieren und Filtern auf relevante Unternehmensinhalte\nfunction compressBusinessContent(text) {\n  // Liste von Stoppw\u00f6rtern/Phrasen, die oft irrelevant sind\n  const irrelevantPhrases = [\n    'kontakt', 'impressum', 'datenschutz', 'agb', 'newsletter', 'login', 'registrieren',\n    'folgen sie uns', 'social media', 'copyright', 'all rights reserved', 'sitemap'\n  ];\n  \n  // Erweiterte Schl\u00fcsselw\u00f6rter f\u00fcr Unternehmensaktivit\u00e4ten, inkl. B\u00fcrospezifika und Akustik\n  const businessKeywords = [\n    'dienstleistungen', 'services', 'produkte', 'l\u00f6sungen', 'angebot', 'portfolio',\n    'automatisierung', 'unterst\u00fctzung', 'support', 'technologie', 'entwicklung',\n    'herstellung', 'verkauf', 'beratung', 'consulting', 'training', 'schulung',\n    // B\u00fcrospezifische Begriffe\n    'b\u00fcro', 'arbeitsplatz', 'b\u00fcroausstattung', 'm\u00f6bel', 'ergonomie', 'b\u00fcroplanung',\n    'arbeitsumgebung', 'office', 'arbeitsstation', 'einrichtung', 'b\u00fcrodesign',\n    // Akustikbezogene Begriffe\n    'akustik', 'schallschutz', 'schallabsorption', 'raumakustik', 'l\u00e4rmschutz',\n    'akustikl\u00f6sungen', 'schalld\u00e4mmung', 'akustikpaneele', 'schalloptimierung',\n    // Allgemeine L\u00f6sungsbegriffe\n    'optimierung', 'systeme', 'integration', 'effizienz', 'prozesse', 'management',\n    'software', 'hardware', 'innovation', 'ma\u00dfgeschneidert', 'l\u00f6sungsanbieter',\n    'qualit\u00e4t', 'zuverl\u00e4ssigkeit', 'nachhaltigkeit'\n  ];\n\n  // Text in S\u00e4tze aufteilen (nach Punkten, aber Leerzeichen beibehalten)\n  const sentences = text.split('. ').map(s => s.trim());\n\n  // Filtere S\u00e4tze:\n  // - Behalte alle S\u00e4tze, die keine irrelevantPhrases enthalten\n  const relevantSentences = sentences.filter(sentence => {\n    const lowerSentence = sentence.toLowerCase();\n    const hasIrrelevantPhrase = irrelevantPhrases.some(phrase => lowerSentence.includes(phrase));\n    return !hasIrrelevantPhrase;\n  });\n\n  // Sortiere S\u00e4tze: S\u00e4tze mit businessKeywords zuerst\n  const sortedSentences = relevantSentences.sort((a, b) => {\n    const lowerA = a.toLowerCase();\n    const lowerB = b.toLowerCase();\n    const hasKeywordA = businessKeywords.some(keyword => lowerA.includes(keyword));\n    const hasKeywordB = businessKeywords.some(keyword => lowerB.includes(keyword));\n    return hasKeywordB - hasKeywordA; // S\u00e4tze mit Keywords nach vorne\n  });\n\n  // Verbinde die relevanten S\u00e4tze und begrenze die L\u00e4nge (max. 5000 Zeichen)\n  let compressedText = sortedSentences.join('. ').trim();\n  if (compressedText.length > 5000) {\n    compressedText = compressedText.substring(0, 4997) + '...';\n  }\n\n  // Falls kein relevanter Inhalt gefunden wurde, gib eine Standardmeldung zur\u00fcck\n  return compressedText || 'Keine spezifischen Informationen zu Unternehmensaktivit\u00e4ten gefunden.';\n}\n\n// Bereinigten Text verarbeiten\nconst cleanedText = cleanHtml(htmlContent);\n\n// Komprimierten Text mit Fokus auf Unternehmensinhalte erstellen\nconst compressedText = compressBusinessContent(cleanedText);\n\n// R\u00fcckgabe im n8n-Format\nreturn [{ json: { compressedText: compressedText } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3220,
        2880
      ],
      "id": "dd744e88-d308-4a27-b835-8aa626ce6405",
      "name": "Code"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f8ff70cb-6498-4be8-9084-a836673de9b8",
              "leftValue": "={{ $('HTTP Request5').first().json.data }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2600,
        2700
      ],
      "id": "7e7060c2-ac20-4359-a9a8-ff93c61f94cd",
      "name": "If"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('AI Agent8').first().json.output }}",
        "options": {
          "systemMessage": "Du bist ein hochqualifizierter Firmenklassifizierer und Rechercheur mit Zugriff auf zuverl\u00e4ssige Datenquellen.\nDeine Aufgabe ist es, ein Unternehmen anhand des Firmennamens und einer kurzen T\u00e4tigkeitsbeschreibung kontextbezogen zu bewerten.\n\nZu ber\u00fccksichtigende Branchen\n\nAkustik (Raumakustik, Schalld\u00e4mmung, Beschallungstechnik, Audio)\nB\u00fcro (B\u00fcroplanung, B\u00fcrom\u00f6bel, B\u00fcro\u2011Trennw\u00e4nde, Drucker, Druckerverleih, B\u00fcrost\u00fchle, B\u00fcrotische, B\u00fcro\u2011IT)\nName als Indikator\n\nEgal, ob Dienstleistung, Produkt, Entwicklung, Verkauf, Vermietung oder Beratung \u2013 z\u00e4hlt nur, ob das Hauptgesch\u00e4ft ausschlie\u00dflich oder haupts\u00e4chlich in einer oder beiden dieser Branchen liegt.\n\nEnth\u00e4lt der Firmenname ausschlie\u00dflich Keywords aus Akustik oder B\u00fcrobranche (z.\u00a0B. \u201eB\u00fcroplaner GmbH\u201c, \u201eAkustikmeister GmbH\u201c), wertet das stark f\u00fcr 1.\nVerkn\u00fcpft der Name Zielbranchen mit anderen Bereichen (z.\u00a0B. \u201eAkustik und Fitnessger\u00e4te GmbH\u201c), gilt das als 0.\nFehlen im Namen Treffer, bewerte nur anhand der T\u00e4tigkeitsbeschreibung.\nEntscheidungsregeln\n\n1, wenn Name und/oder jede genannte T\u00e4tigkeit ausschlie\u00dflich oder \u00fcberwiegend zu Akustik und/oder B\u00fcro\u00adbranche geh\u00f6rt.\n0, sobald Name oder mindestens eine T\u00e4tigkeit klar nicht dazugeh\u00f6rt (z.\u00a0B. Schultische, Fu\u00dfballklamotten, Festivaltechnik).\n1, wenn T\u00e4tigkeiten unklar sind, aber eindeutige Keywords aus Zielbranchen vorliegen und der Name nicht widerspricht.\n0, wenn es sich lediglich um einen normalen M\u00f6belh\u00e4ndler ohne spezifischen B\u00fcro\u00adbezug handelt.\nWichtig\n\nVerstehe Zusammenh\u00e4nge: \u201eDruckerverleih\u201c z\u00e4hlt zu B\u00fcrobranche; \u201eSchultische\u201c nicht.\nBeurteile ganzheitlich: Name\u00a0+\u00a0Beschreibung m\u00fcssen passen.\nGib nur den Integer 0 oder 1 zur\u00fcck \u2013 keine Erkl\u00e4rungen, Kommentare oder zus\u00e4tzlichen Text.\nInput\n\u2013 Firmenname\n\u2013 T\u00e4tigkeitsbeschreibung (Liste, z.\u00a0B. \u201eB\u00fcrom\u00f6belverkauf, Druckerverleih, Raumakustik-Planung\u201c)\n\nOutput\n\n0\u00a0oder\u00a01"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        3840,
        2880
      ],
      "id": "d1cda2ee-3622-4edf-bac7-731aca4ca1f9",
      "name": "AI Agent7"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Code').first().json.compressedText }}",
        "options": {
          "systemMessage": "Du bist ein hochqualifizierter Firmenklassifizierer und Rechercheur mit Zugriff auf zuverl\u00e4ssige Datenquellen.\nDeine Aufgabe ist es, ein Unternehmen anhand des Firmennamens und einer kurzen T\u00e4tigkeitsbeschreibung pr\u00e4zise zu analysieren.\n\nAnleitung:\n\nNutze sowohl Firmennamen als auch T\u00e4tigkeitsbeschreibung, um die tats\u00e4chlichen Kernt\u00e4tigkeiten zu ermitteln.\nGib so viele der wichtigsten T\u00e4tigkeiten aus, wie tats\u00e4chlich vorhanden sind (mindestens\u00a02, maximal\u00a05).\nFormuliere jede T\u00e4tigkeit als Stichpunkt mit 3\u20135 W\u00f6rtern.\nKeine Branchenbezeichnungen, Einordnungen, Erkl\u00e4rungen oder Zusatzinfos.\nKeine Wiederholungen oder Synonyme.\nDie Ausgabe ist eine durch Kommas getrennte Liste der Stichpunkte.\nBeispielausgaben:\n\n\u201eB\u00fcrom\u00f6belverkauf, Festivalorganisation, H\u00f6rger\u00e4teanpassung, Grafikdesign, Immobilienvermittlung\u201c\n\u201eH\u00f6rger\u00e4teberatung, Schalld\u00e4mmungssysteme, Konferenzmikrofontechnik\u201c\n\u201eErgonomische B\u00fcrost\u00fchle, Akustikdeckenmontage, Schulm\u00f6belproduktion\u201c"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        3480,
        2880
      ],
      "id": "f58a11db-654c-4206-877b-88a6bcb2199f",
      "name": "AI Agent8"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1135880709,
          "mode": "list",
          "cachedResultName": "RowsToDelete",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=1135880709"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "User-IP": "={{ $('Loop Over Items').first().json['User-IP'] }}",
            "Date": "={{ $('Loop Over Items').first().json.Date }}",
            "Time": "={{ $('Loop Over Items').first().json.Time }}",
            "Form-Language": "={{ $('Loop Over Items').first().json['Form-Language'] }}",
            "First name": "={{ $('Loop Over Items').first().json['First name'] }}",
            "Salutation": "={{ $('Loop Over Items').first().json.Salutation }}",
            "Name": "={{ $('Loop Over Items').first().json.Name }}",
            "Company": "={{ $('Loop Over Items').first().json.Company }}",
            "Address": "={{ $('Loop Over Items').first().json.Address }}",
            "Country": "={{ $('Loop Over Items').first().json.Country }}",
            "E-Mail": "={{ $('Loop Over Items').first().json['E-Mail'] }}",
            "Newsletter": "={{ $('Loop Over Items').first().json.Newsletter }}",
            "How did you become attentive on the pCon.planner": "={{ $('Loop Over Items').first().json['How did you become attentive on the pCon.planner'] }}",
            "I use the pCon.planner as": "={{ $('Loop Over Items').first().json['I use the pCon.planner as'] }}",
            "Version": "={{ $('Loop Over Items').first().json.Version }}",
            "Edition": "={{ $('Loop Over Items').first().json.Edition }}",
            "branche": "={{ $('AI Agent8').first().json.output }}"
          },
          "matchingColumns": [
            "User-IP"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        5000,
        2800
      ],
      "id": "c3a73918-14d4-4749-9fa4-bfb184996f0b",
      "name": "Google Sheets5",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df41ef12-68ad-48d2-9ab4-6a7423818213",
              "leftValue": "={{ $('AI Agent7').first().json.output }}",
              "rightValue": "1",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        4360,
        2860
      ],
      "id": "34c6b13f-5113-4792-b5e3-1223217a6776",
      "name": "If2"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI",
          "mode": "list",
          "cachedResultName": "K&S-Automation-Test",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 211066673,
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-pxibGJvkT5mVrD1Mb1Xj-0Bt56ZXj8pQST5LNq4pTI/edit#gid=211066673"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "E-Mail": "={{ $('Loop Over Items').first().json['E-Mail'] }}",
            "branche": "={{ $('AI Agent8').first().json.output }}"
          },
          "matchingColumns": [
            "E-Mail"
          ],
          "schema": [
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "User-IP",
              "displayName": "User-IP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Form-Language",
              "displayName": "Form-Language",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Salutation",
              "displayName": "Salutation",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "First name",
              "displayName": "First name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company",
              "displayName": "Company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E-Mail",
              "displayName": "E-Mail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Newsletter",
              "displayName": "Newsletter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "How did you become attentive on the pCon.planner",
              "displayName": "How did you become attentive on the pCon.planner",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "I use the pCon.planner as",
              "displayName": "I use the pCon.planner as",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Version",
              "displayName": "Version",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Edition",
              "displayName": "Edition",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CompanyPhone",
              "displayName": "CompanyPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "branche",
              "displayName": "branche",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        4820,
        2920
      ],
      "id": "8c509003-41e2-4179-a9ad-0fc87f0061ab",
      "name": "Google Sheets6",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Zugriff auf die HTML-Daten aus der Eingabevariable\nconst htmlContent1 = $('HTTP Request2').first().json.data || '';\nconst htmlContent2 = $('HTTP Request3').first().json.data || '';\n\n// Funktion zum Entfernen von HTML-Tags, JavaScript, CSS und Bereinigen des Textes\nfunction cleanHtml(html) {\n  // Entferne <script> und <style> Tags samt Inhalt\n  html = html.replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '');\n  html = html.replace(/<style\\b[^<]*(?:(?!<\\/style>)<[^<]*)*<\\/style>/gi, '');\n  \n  // Entferne alle HTML-Tags, behalte den Text dazwischen\n  html = html.replace(/<[^>]+>/g, '');\n  \n  // Entferne \u00fcberfl\u00fcssige Leerzeichen, Tabs und Zeilenumbr\u00fcche\n  html = html.replace(/\\s+/g, ' ').trim();\n  \n  // Entferne HTML-Entities (z. B. &nbsp;, &amp;)\n  html = html.replace(/&[a-zA-Z0-9#]+;/g, '');\n\n  return html;\n}\n\n// Beide HTML-Inhalte bereinigen\nconst cleanedText1 = cleanHtml(htmlContent1);\nconst cleanedText2 = cleanHtml(htmlContent2);\n\n// Zusammenf\u00fcgen oder Standardtext, wenn beide leer sind\nlet combinedCleanedText = '';\n\nif (cleanedText1 && cleanedText2) {\n  combinedCleanedText = `${cleanedText1} ${cleanedText2}`;\n} else if (cleanedText1) {\n  combinedCleanedText = cleanedText1;\n} else if (cleanedText2) {\n  combinedCleanedText = cleanedText2;\n} else {\n  combinedCleanedText = 'keine telefonnummer gefunden';\n}\n\n// R\u00fcckgabe des kombinierten Textes im n8n-Format\nreturn [{ json: { cleanedText: combinedCleanedText } }];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3800,
        4320
      ],
      "id": "d41d83f5-1964-41a9-b6db-4b2e257f7664",
      "name": "Code1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1820,
        4280
      ],
      "id": "effebb3b-fe86-4f1a-8121-5c5cba8c7e58",
      "name": "Wait7"
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "DeleteRows"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -400,
        2720
      ],
      "id": "1c98ab4b-6648-4fd4-b976-e02c53a2b3c3",
      "name": "deleteRows1",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "={{ $('setScriptUrl').first().json.url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "script",
              "value": "DeleteRows"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -260,
        4020
      ],
      "id": "5f69990f-44c9-46ea-89c4-b768bbfc1ac5",
      "name": "deleteRows2",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "fromEmail": "denny@redel-aisolutions.com",
        "toEmail": "denny@redel-aisolutions.com",
        "subject": "K&S Downloadliste",
        "emailFormat": "text",
        "text": "finished",
        "options": {}
      },
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        2920,
        7720
      ],
      "id": "ebfe34aa-9c43-4f3d-ae7b-fa96c3d4e412",
      "name": "Send Email",
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "downloadAttachments": true,
        "options": {}
      },
      "type": "n8n-nodes-base.emailReadImap",
      "typeVersion": 2,
      "position": [
        -1260,
        280
      ],
      "id": "e206e3f5-92e4-4f59-8de6-e36d16b044a2",
      "name": "Email Trigger (IMAP)",
      "credentials": {
        "imap": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "xlsx",
        "binaryPropertyName": "attachment_0",
        "options": {
          "sheetName": "WOS-DE"
        }
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        -1060,
        280
      ],
      "id": "3e908c2f-fdb0-44f3-a3c8-2e0ef37bc1e0",
      "name": "Extract from File"
    }
  ],
  "connections": {
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "setScriptUrl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "deleteRows2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "isEmailPrivat4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets3": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "AI Agent3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items3": {
      "main": [
        [
          {
            "node": "Wait5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me3": {
      "main": [
        [
          {
            "node": "Loop Over Items3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets9": {
      "main": [
        [
          {
            "node": "Replace Me3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent3": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Replace Me3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets11": {
      "main": [
        [
          {
            "node": "Loop Over Items3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent4": {
      "main": [
        [
          {
            "node": "If4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If4": {
      "main": [
        [
          {
            "node": "Google Sheets9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request3": {
      "main": [
        [
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isEmailPrivat1": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me4": {
      "main": [
        [
          {
            "node": "Loop Over Items4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets15": {
      "main": [
        [
          {
            "node": "Loop Over Items4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isEmailPrivat2": {
      "main": [
        [
          {
            "node": "HTTP Request7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items4": {
      "main": [
        [
          {
            "node": "deleteNoPhoneNumbers",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "isEmailPrivat2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request6": {
      "main": [
        [
          {
            "node": "AI Agent9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent2": {
      "main": [
        [
          {
            "node": "If9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets14": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent9": {
      "main": [
        [
          {
            "node": "AI Agent2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If9": {
      "main": [
        [
          {
            "node": "Google Sheets14",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent10",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets19": {
      "main": [
        [
          {
            "node": "Replace Me4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent10": {
      "main": [
        [
          {
            "node": "If10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If10": {
      "main": [
        [
          {
            "node": "Google Sheets19",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request7": {
      "main": [
        [
          {
            "node": "HTTP Request8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request8": {
      "main": [
        [
          {
            "node": "AI Agent10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me5": {
      "main": [
        [
          {
            "node": "Loop Over Items5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets22": {
      "main": [
        [
          {
            "node": "Loop Over Items5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isEmailPrivat3": {
      "main": [
        [
          {
            "node": "AI Agent13",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items5": {
      "main": [
        [
          {
            "node": "deleteRows1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "isEmailPrivat3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent13",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent14",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets23": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent13": {
      "main": [
        [
          {
            "node": "If13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If13": {
      "main": [
        [
          {
            "node": "Google Sheets23",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent14": {
      "main": [
        [
          {
            "node": "If17",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "Replace Me5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "deletePrivatUsers": {
      "main": [
        [
          {
            "node": "Google Sheets22",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "setScriptUrl": {
      "main": [
        [
          {
            "node": "deletePartnersByCompany",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "deletePartnersByCompany": {
      "main": [
        [
          {
            "node": "isAlreadyPartnerEmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isAlreadyPartnerEmail": {
      "main": [
        [
          {
            "node": "deletePrivatUsers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "deleteNoPhoneNumbers": {
      "main": [
        [
          {
            "node": "sortSheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request9": {
      "main": [
        [
          {
            "node": "AI Agent15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me6": {
      "main": [
        [
          {
            "node": "Loop Over Items6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent15",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent16",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent15": {
      "main": [
        [
          {
            "node": "If14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If14": {
      "main": [
        [
          {
            "node": "Google Sheets24",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Loop Over Items6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isEmailPrivat": {
      "main": [
        [
          {
            "node": "If15",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If15": {
      "main": [
        [
          {
            "node": "HTTP Request9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items6": {
      "main": [
        [
          {
            "node": "Wait6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "isEmailPrivat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request10": {
      "main": [
        [
          {
            "node": "AI Agent16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent16": {
      "main": [
        [
          {
            "node": "If16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If16": {
      "main": [
        [
          {
            "node": "Google Sheets18",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets18": {
      "main": [
        [
          {
            "node": "Replace Me6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets24": {
      "main": [
        [
          {
            "node": "Replace Me6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent9",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent2",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent8",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent7",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "sortSheet": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Google Sheets3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Google Sheets11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait5": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait6": {
      "main": [
        [
          {
            "node": "Google Sheets15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets25": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If17": {
      "main": [
        [
          {
            "node": "Google Sheets25",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets2": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets4": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isEmailPrivat4": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request5": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "AI Agent8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "HTTP Request6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent7": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent8": {
      "main": [
        [
          {
            "node": "AI Agent7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets5": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Google Sheets5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets6": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "AI Agent4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait7": {
      "main": [
        [
          {
            "node": "isEmailPrivat1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "deleteRows1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "deleteRows2": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Trigger (IMAP)": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "58cb9f36-ba65-4468-ab08-0860561eade9",
  "id": "gzJgpTnJfV4nLPM7",
  "tags": []
}