{
  "id": "9GW2AVoU4cVMOrkr",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "28  Scrape Local Business Directories",
  "tags": [],
  "nodes": [
    {
      "id": "eedd4234-2cee-42a5-bd0e-389361be7b9b",
      "name": "\ud83d\udd18 Trigger: Manual Execution",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -300,
        -100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "49faaaf3-e19f-4a60-a703-fe61db31544b",
      "name": "\ud83d\udd17 Set Yelp Business URL for Dr",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        -100
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d1dc3293-4616-498b-a682-432445d59eb0",
              "name": "URL",
              "type": "string",
              "value": "https://www.yelp.com/biz/william-kimbrough-md-washington"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a2c73d83-2ad9-423f-b025-e1171bc7dc6c",
      "name": "\ud83e\udd16 Agent: Scrape Yelp Business Info",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        200,
        -100
      ],
      "parameters": {
        "text": "=You are a data extraction agent.\n\nScrape the following Yelp URL:\n{{ $json.URL }}\n\nExtract data for businesses (Doctors) listed on this page. For each business, provide the following details: \n\n- `Business Name`: The name of the business (Doctor's name or practice).\n- `Location`: The full address or location of the business.\n- `Contact Phone`: The contact Phone of the business (if available, otherwise dont return ).\n- `Category`: The category or type of business (e.g., \"Doctors\").\n- `Rating`: The Yelp rating (numeric value, e.g., \"4.5\").\n- `Reviews`: The number of reviews.\n- `Website`: The website of the business (if available, otherwise dont return ).\n",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "1dfe9fc1-9053-479d-8819-ea1cfe5d4cb9",
      "name": "\ud83d\udcac AI Model: Process Data",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        140,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "211bda52-986c-4941-9949-805df3e89c3e",
      "name": "\ud83c\udf10 Bright Data MCP Client",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        280,
        160
      ],
      "parameters": {
        "toolName": "scrape_as_markdown",
        "operation": "executeTool",
        "toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
      },
      "credentials": {
        "mcpClientApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bd66a3af-19ff-48e4-ba33-4481ef65e04c",
      "name": "\ud83d\udce7 Send Partnership Proposal to Business Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        660,
        -100
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=Dear {{ $json.output[0].business_name }},\n\nI hope this message finds you well. I am reaching out to explore a potential partnership with your business, as I noticed your exceptional reputation on Yelp with a rating of {{ $json.output[0].rating }}. We specialize in providing innovative solutions for businesses in the {{ $json.output[0].category }} industry, and I believe there is a strong synergy between our services.\n\nPlease let us know if you're open to discussing further details. You can visit our website at {{ $json.output[0].website }}, or feel free to reach out via email at shahkar.genai@gmail.com.\n\nLooking forward to hearing from you soon.\n\nBest regards,\n[Your Name]\n[Your Company]\n",
        "options": {},
        "subject": "=Potential Partnership with {{ $json.output[0].business_name }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "763b2b0e-acc7-4c3f-a5bc-dd62664dbff1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -860
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 960,
        "content": "### \ud83d\udd39 **SECTION 1: Trigger & Set Yelp Business URL**\n\n#### \ud83e\udde9 **Nodes:**\n\n* `\u26a1 Trigger: Manual Execution`\n* `\ud83d\udcdd Set Yelp Business URL for Dr. William Kimbrough, MD`\n\n#### \ud83d\udca1 **What Happens:**\n\n1. **Trigger the Workflow:**\n\n   * You **manually start** the workflow by clicking the **\"Execute\"** button in n8n.\n2. **Set Yelp Business URL:**\n\n   * **You input** the URL of the **Yelp business profile** for Dr. William Kimbrough (or any business you want) into the system, and this URL will serve as the data source for the rest of the workflow.\n\n   Example URL:\n   `https://www.yelp.com/biz/dr-william-kimbrough-md`\n\n#### \u2705 **How You Can Use It:**\n\n* **Simple Setup:** This section lets you easily input the URL of **any Yelp business**, so you can use this workflow for multiple businesses by just changing the URL each time.\n* **No coding skills required:** Simply paste the URL, click **\u201cExecute\u201d**, and you're good to go!"
      },
      "typeVersion": 1
    },
    {
      "id": "d2cf6b8c-6d00-4eed-8a95-815088f8daf2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -980
      ],
      "parameters": {
        "color": 5,
        "width": 420,
        "height": 1080,
        "content": "### \ud83e\udd16 **SECTION 2: AI Agent Scrapes Business Information**\n\n#### \ud83e\udde9 **Node:**\n\n* `\ud83e\udd16 Agent: Scrape Yelp Business Info`\n\n##### **Sub-Nodes Inside the Agent:**\n\n* **\ud83e\udde0 AI Model: Process Data**: Understands the data request and prepares for scraping.\n* **\ud83c\udf10 Bright Data MCP Client: Scrape as Markdown**: Scrapes business data from the Yelp profile using the **Bright Data MCP Client** with the **\u201cscrape\\_as\\_markdown\u201d** tool.\n* **\ud83e\uddfe Parse Scraped Data into JSON**: Takes the raw data from Yelp and organizes it into **JSON format**, so it\u2019s easy to use in later steps.\n\n#### \ud83d\udca1 **What Happens:**\n\n1. The **AI Model** receives the request to scrape the Yelp business profile data.\n2. The **MCP Client** is the tool that accesses the **Yelp website** and **scrapes** the business information, such as reviews, address, hours, phone number, and services offered.\n3. The scraped data is **parsed and structured** into a **JSON format**, which ensures the data is ready to be used in other steps of the workflow (e.g., sending it via email).\n\n#### \u2705 **How You Can Use It:**\n\n* **Effortless Scraping:** The **AI Agent** automatically scrapes all the necessary business details from Yelp without you needing to manually copy or extract any information.\n* **No Coding:** Simply set the Yelp URL, and the AI handles the scraping and organizing.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ee19e06d-a7ef-4e6b-b70d-404149c97365",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        -820
      ],
      "parameters": {
        "width": 340,
        "height": 920,
        "content": "### \ud83d\udce7 **SECTION 3: Send Email Proposal to Business**\n\n#### \ud83e\udde9 **Node:**\n\n* `\ud83d\udce7 Send Partnership Proposal to Business Email`\n\n#### \ud83d\udca1 **What Happens:**\n\n1. After the business details are scraped and organized, the workflow **automatically sends** an email to the **business\u2019s email address** (found in the Yelp profile) with a **partnership proposal**.\n2. The email can include a personalized message, along with the **scraped business information**, offering a **business partnership**.\n\n#### \u2705 **How You Can Use It:**\n\n* **Automated Emailing:** You don\u2019t have to write or send emails manually. The workflow sends a **pre-drafted proposal** to the business, making it faster and more efficient.\n* **Outreach Efficiency:** This allows you to automatically send partnership emails to multiple businesses by simply changing the Yelp URL each time."
      },
      "typeVersion": 1
    },
    {
      "id": "11578249-29a6-43ef-a786-4172ca69285a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -940
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 2360,
        "content": "## \ud83d\ude80 **Yelp Business Scraper and Email Workflow for Partnership Proposal**\n\nThis workflow is designed to help you automatically scrape **business details** from a **Yelp business profile** (like Dr. William Kimbrough\u2019s profile), then send a **partnership proposal email** to the business. Let\u2019s break it down into **3 simple sections**!\n\n---\n\n### \ud83d\udd39 **SECTION 1: Trigger & Set Yelp Business URL**\n\n#### \ud83e\udde9 **Nodes:**\n\n* `\u26a1 Trigger: Manual Execution`\n* `\ud83d\udcdd Set Yelp Business URL for Dr. William Kimbrough, MD`\n\n#### \ud83d\udca1 **What Happens:**\n\n1. **Trigger the Workflow:**\n\n   * You **manually start** the workflow by clicking the **\"Execute\"** button in n8n.\n2. **Set Yelp Business URL:**\n\n   * **You input** the URL of the **Yelp business profile** for Dr. William Kimbrough (or any business you want) into the system, and this URL will serve as the data source for the rest of the workflow.\n\n   Example URL:\n   `https://www.yelp.com/biz/dr-william-kimbrough-md`\n\n#### \u2705 **How You Can Use It:**\n\n* **Simple Setup:** This section lets you easily input the URL of **any Yelp business**, so you can use this workflow for multiple businesses by just changing the URL each time.\n* **No coding skills required:** Simply paste the URL, click **\u201cExecute\u201d**, and you're good to go!\n\n---\n\n### \ud83e\udd16 **SECTION 2: AI Agent Scrapes Business Information**\n\n#### \ud83e\udde9 **Node:**\n\n* `\ud83e\udd16 Agent: Scrape Yelp Business Info`\n\n##### **Sub-Nodes Inside the Agent:**\n\n* **\ud83e\udde0 AI Model: Process Data**: Understands the data request and prepares for scraping.\n* **\ud83c\udf10 Bright Data MCP Client: Scrape as Markdown**: Scrapes business data from the Yelp profile using the **Bright Data MCP Client** with the **\u201cscrape\\_as\\_markdown\u201d** tool.\n* **\ud83e\uddfe Parse Scraped Data into JSON**: Takes the raw data from Yelp and organizes it into **JSON format**, so it\u2019s easy to use in later steps.\n\n#### \ud83d\udca1 **What Happens:**\n\n1. The **AI Model** receives the request to scrape the Yelp business profile data.\n2. The **MCP Client** is the tool that accesses the **Yelp website** and **scrapes** the business information, such as reviews, address, hours, phone number, and services offered.\n3. The scraped data is **parsed and structured** into a **JSON format**, which ensures the data is ready to be used in other steps of the workflow (e.g., sending it via email).\n\n#### \u2705 **How You Can Use It:**\n\n* **Effortless Scraping:** The **AI Agent** automatically scrapes all the necessary business details from Yelp without you needing to manually copy or extract any information.\n* **No Coding:** Simply set the Yelp URL, and the AI handles the scraping and organizing.\n\n---\n\n### \ud83d\udce7 **SECTION 3: Send Email Proposal to Business**\n\n#### \ud83e\udde9 **Node:**\n\n* `\ud83d\udce7 Send Partnership Proposal to Business Email`\n\n#### \ud83d\udca1 **What Happens:**\n\n1. After the business details are scraped and organized, the workflow **automatically sends** an email to the **business\u2019s email address** (found in the Yelp profile) with a **partnership proposal**.\n2. The email can include a personalized message, along with the **scraped business information**, offering a **business partnership**.\n\n#### \u2705 **How You Can Use It:**\n\n* **Automated Emailing:** You don\u2019t have to write or send emails manually. The workflow sends a **pre-drafted proposal** to the business, making it faster and more efficient.\n* **Outreach Efficiency:** This allows you to automatically send partnership emails to multiple businesses by simply changing the Yelp URL each time.\n\n---\n\n### **Summary of the Workflow**\n\n| **Section**                                 | **What Happens**                                                                                                                          |\n| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| **\ud83d\udd18 Section 1: Trigger & Input URL**       | You manually trigger the workflow and input the Yelp URL of the business you want to scrape (e.g., Dr. William Kimbrough\u2019s Yelp profile). |\n| **\ud83e\udd16 Section 2: Scrape Yelp Business Info** | The AI Agent scrapes the business info from Yelp and formats it into a **structured JSON format**.                                        |\n| **\ud83d\udce7 Section 3: Send Email**                | Automatically sends a **partnership proposal email** to the business using the **scraped data**.                                          |\n\n---\n\n### \u2705 **How This Helps You:**\n\n| **Use Case**                           | **Benefit**                                                      |\n| -------------------------------------- | ---------------------------------------------------------------- |\n| \ud83e\udd1d **Partnership Outreach**            | Automatically send partnership proposals to businesses.          |\n| \ud83d\udcc8 **Business Information Collection** | Scrape business info (e.g., hours, reviews) from Yelp with ease. |\n| \ud83d\udd52 **Time-Saving**                     | No more manual scraping and emailing. **Save hours of work**.    |\n"
      },
      "typeVersion": 1
    },
    {
      "id": "bc8b2708-6f3c-4386-9a06-338e145ace83",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        -820
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## I\u2019ll receive a tiny commission if you join Bright Data through this link\u2014thanks for fueling more free content!\n\n### https://get.brightdata.com/1tndi4600b25"
      },
      "typeVersion": 1
    },
    {
      "id": "eacc825c-0715-4bbd-b7b8-b137128ea38c",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -1300
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
      },
      "typeVersion": 1
    },
    {
      "id": "10525ffe-08f0-4b5a-b099-64a36f417f20",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        400,
        160
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "a59d20f8-71ee-4921-8e83-59c496b8fd62",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        340,
        380
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7c657853-2328-4169-9ffe-99b195015dec",
      "name": "\ud83d\udcdd Parse Scraped Data into JSON1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        520,
        360
      ],
      "parameters": {
        "jsonSchemaExample": "[\n  {\n    \"business_name\": \"William Kimbrough, MD\",\n    \"location\": \"1350 Connecticut Ave Ste 1250 One Medical, Washington, DC 20036\",\n    \"contact_phone\": \"(202) 660-0005\",\n    \"category\": \"Internal Medicine, Family Practice\",\n    \"rating\": 5.0,\n    \"reviews\": 6,\n    \"website\": \"http://www.onemedical.com/dc/doctors?utm_medium=referral&utm_source=yelp.com&utm_campaign=sitelink\"\n  }\n]\n"
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c1faa689-fe24-40a9-b121-fd63be1ebe1b",
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "\ud83e\udd16 Agent: Scrape Yelp Business Info",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "\ud83c\udf10 Bright Data MCP Client": {
      "ai_tool": [
        [
          {
            "node": "\ud83e\udd16 Agent: Scrape Yelp Business Info",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcac AI Model: Process Data": {
      "ai_languageModel": [
        [
          {
            "node": "\ud83e\udd16 Agent: Scrape Yelp Business Info",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd18 Trigger: Manual Execution": {
      "main": [
        [
          {
            "node": "\ud83d\udd17 Set Yelp Business URL for Dr",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd17 Set Yelp Business URL for Dr": {
      "main": [
        [
          {
            "node": "\ud83e\udd16 Agent: Scrape Yelp Business Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcdd Parse Scraped Data into JSON1": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udd16 Agent: Scrape Yelp Business Info": {
      "main": [
        [
          {
            "node": "\ud83d\udce7 Send Partnership Proposal to Business Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}