{
  "nodes": [
    {
      "id": "4087fd3a-82a1-4879-8485-02dc833c9c6a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -580,
        460
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7a0ebea8-f584-4d8e-b798-4a82adb7b39e",
      "name": "Start Results (Apify)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -360,
        460
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/nwua9Gu5YrADL7ZDj/runs?token=$env.APIFY_API_TOKEN",
        "method": "POST",
        "options": {},
        "jsonBody": "{\"includeWebResults\": false,\"language\": \"en\",\"locationQuery\": \"Toronto\",\"maxCrawledPlacesPerSearch\": 12,\"searchStringsArray\": [\"barber\"],\"scrapeContacts\": true}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "2a869b44-e5e8-4bab-922d-fc1153248d2a",
      "name": "Wait for all results",
      "type": "n8n-nodes-base.wait",
      "position": [
        -100,
        460
      ],
      "webhookId": "655bb8eb-9b65-4028-ae5b-0a45d87cab21",
      "parameters": {
        "unit": "minutes",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "b5e8bc74-e925-446d-bf4e-c0df78a08206",
      "name": "Get Results (Apify)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        100,
        460
      ],
      "parameters": {
        "url": "copy get run URL from Apify",
        "method": "GET",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "d232ea32-e66a-4870-be21-5a0bcf01ddb3",
      "name": "Split Out into Google Sheets",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        400,
        460
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "title",
        "fieldsToInclude": "address, state, neighborhood, phone, emails"
      },
      "typeVersion": 1
    },
    {
      "id": "7c2eb1e1-470d-4852-a3c1-04f8386d1dc6",
      "name": "Update Scraped Information",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        580,
        460
      ],
      "parameters": {
        "columns": {
          "value": {
            "phone": "={{ $json.phone.replace('+', '') }}",
            "state": "={{ $json.state }}",
            "title": "={{ $json.title }}",
            "emails": "={{ $json.emails }}",
            "address": "={{ $json.address }}",
            "neighborhood": "={{ $json.neighborhood }}"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "title"
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "address"
            },
            {
              "id": "state",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "state"
            },
            {
              "id": "neighborhood",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "neighborhood"
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "phone"
            },
            {
              "id": "emails",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "emails"
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "title"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "dssdd"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "credential-id",
          "name": "googleSheetsOAuth2Api Credential"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "connections": {
    "Get Results (Apify)": {
      "main": [
        [
          {
            "node": "Split Out into Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for all results": {
      "main": [
        [
          {
            "node": "Get Results (Apify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Results (Apify)": {
      "main": [
        [
          {
            "node": "Wait for all results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out into Google Sheets": {
      "main": [
        [
          {
            "node": "Update Scraped Information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Start Results (Apify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}