Automatisierung Lead-Scraper: Apify zu Google Sheets

Fortgeschritten

Dies ist ein Sales, AI, Marketing-Bereich Automatisierungsworkflow mit 6 Nodes. Hauptsächlich werden Set, Code, HttpRequest, GoogleSheets, ManualTrigger und andere Nodes verwendet, kombiniert mit KI-Technologie für intelligente Automatisierung. Automatisierte Lead-Generierung von Apify zu Google Sheets durch Datenbereinigung

Voraussetzungen
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
  • Google Sheets API-Anmeldedaten
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "8dpOtivR6zGMa8Nf",
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc",
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Lead Scraper: Apify to Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "331e904a-362e-4b18-ac01-60bd138a7ee1",
      "name": "Manueller Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1740,
        -300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c8c72d6e-4558-4ab1-9c19-2b8e3cefc856",
      "name": "Run Apify Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1280,
        -300
      ],
      "parameters": {
        "url": "={{ 'https://api.apify.com/v2/actor-tasks/' + $json.APIFY_TASK_ID + '/run-sync-get-dataset-items?token=' +$json.APIFY_TOKEN}}",
        "options": {
          "splitIntoItems": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fb61d5a9-0352-4079-a00f-c42df06bb09e",
      "name": "Daten bereinigen",
      "type": "n8n-nodes-base.code",
      "position": [
        -1080,
        -300
      ],
      "parameters": {
        "jsCode": "// Clean scraped data before LLM processing\nreturn $input.all().map(item => ({\n  ...item.json,\n  phone: item.json.phone?.replace(/[^\\d+]/g, '') || '',\n  email: item.json.email?.toLowerCase().trim() || ''\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "a6988139-87e5-423c-bec9-ce155f617dab",
      "name": "Export zu Google Tabellen",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -760,
        -300
      ],
      "parameters": {
        "columns": {
          "value": {
            "phone": "={{ $json.phone }}",
            "Address": "={{ $json.address }}",
            "company name": "={{ $json.title }}"
          },
          "schema": [
            {
              "id": "company name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "company name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UHkd_OuK1Xzc0ZXo7FPrsd5M1JlsIY9pJDC3fsJ3oq8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UHkd_OuK1Xzc0ZXo7FPrsd5M1JlsIY9pJDC3fsJ3oq8/edit?usp=drivesdk",
          "cachedResultName": "leas list solar"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f4398fd2-bff0-4e9c-ae1b-f5950be0a384",
      "name": "Variablen",
      "type": "n8n-nodes-base.set",
      "position": [
        -1500,
        -300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4486360c-2296-41ad-a48f-706e24c49a4f",
              "name": "APIFY_TOKEN",
              "type": "string",
              "value": "YOUR_APIFY_API_TOKEN"
            },
            {
              "id": "6e56b0e3-36ae-4f1e-b0e5-38767bbe8af9",
              "name": "APIFY_TASK_ID",
              "type": "string",
              "value": "YOUR_APIFY_TASK_ID"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "04a980cf-365b-4cc3-8439-fd71cb1f05a3",
      "name": "Haftnotiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1860,
        -820
      ],
      "parameters": {
        "color": 7,
        "width": 1660,
        "height": 780,
        "content": "## Automated Business Lead Scraper with Apify to Google Sheets\n**Purpose:** Automates scraping business leads using Apify, cleaning the data, and exporting them to Google Sheets.\n\n**Workflow Steps:**\n1. **Manual Trigger**: Starts the workflow manually.\n2. **Set API Credentials**: Add your `APIFY_TOKEN` and `APIFY_TASK_ID`.\n3. **Run Apify Scraper**: Fetches leads using Apify HTTP API.\n4. **Clean Data**: Formats phone numbers and emails.\n5. **Export to Google Sheets**: Appends data to your spreadsheet.\n\n**Google Sheet Requirements:**\n- Sheet name: `Sheet1`\n- Columns: `company name`, `phone`, `Address`\n\n**Customization Tips:**\n- Add more fields like `email`, `website` in Clean Data and mapping.\n- Add conditions or filters before exporting.\n- Add email alerts if needed.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "47bf9abd-67aa-49c8-81c9-761e75ee731f",
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "f4398fd2-bff0-4e9c-ae1b-f5950be0a384",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f4398fd2-bff0-4e9c-ae1b-f5950be0a384": {
      "main": [
        [
          {
            "node": "c8c72d6e-4558-4ab1-9c19-2b8e3cefc856",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fb61d5a9-0352-4079-a00f-c42df06bb09e": {
      "main": [
        [
          {
            "node": "Export zu Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c8c72d6e-4558-4ab1-9c19-2b8e3cefc856": {
      "main": [
        [
          {
            "node": "fb61d5a9-0352-4079-a00f-c42df06bb09e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

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

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Vertrieb, Künstliche Intelligenz, Marketing

Ist es kostenpflichtig?

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

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes6
Kategorie3
Node-Typen6
Schwierigkeitsbeschreibung

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

Autor
David Olusola

David Olusola

@dae221

I love building smart, efficient automations with n8n that help businesses save time and scale effortlessly. Turning complex workflows into simple solutions is where I have the most fun

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34