🔬 Scrape CareClinics locations and log them to Google Sheets by state

⚡ 2 views · 🔬 Document Extraction & Analysis

💡 Pro Tip — HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it — it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

Quick overview

This workflow manually scrapes CareClinics location listings via HTTP requests, extracts clinic name, address, phone, email, and inferred state, then appends or updates the results into state-specific tabs in a Google Sheets spreadsheet.

How it works

  1. Starts when you run the workflow manually.
  2. Sends a POST request to the CareClinics locations endpoint for the current page of listings.
  3. Parses the returned HTML to extract clinic names, addresses, emails, and phone numbers, infers each clinic’s Malaysian state from the address, and accumulates all clinics across pages.
  4. Checks the pagination metadata and repeats the request with a short delay until all pages are processed.
  5. After the last page, outputs the full clinic list and processes each clinic record one by one.
  6. Appends or updates each clinic in Google Sheets using “HCO Name” as the unique match key and writes the row into the worksheet named after the detected state.

Setup

  1. Add a Google Sheets OAuth2 credential with access to the target spreadsheet.
  2. Update the Google Sheets document ID and ensure the spreadsheet contains worksheets named to match the detected states (for example, Selangor, Johor, Penang, Kuala Lumpur, Putrajaya, and Negeri Sembilan).
  3. Ensure each state worksheet has columns named “HCO Name”, “Phone Number”, “Email”, and “Address” so the append/update mapping works correctly.

Requirements

Customization

Additional info

Scrapes all clinic locations from CareClinics Malaysia’s public locations page via its JetSmartFilters AJAX endpoint (no filter applied, so all states are pulled in one pass). Paginates through every page, extracts Name, Address, Phone, and Email per clinic, detects the Malaysian state from the address, normalizes phone numbers to +60 format, and writes each clinic to the matching state worksheet in Google Sheets. Runs in two phases: all pages are collected first, then each clinic is written one at a time this avoids an n8n limitation where a per-item dynamic sheet name only evaluates correctly when processed individually.

đź”— Nodes Used

Google Sheets, HTTP Request

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup