Quick overview
This workflow collects B2B prospects by searching Google Places for a niche and location, then safely enriches each business by scraping its website (optionally respecting robots.txt) to extract contact details and social links, and upserts verified records into Google Sheets.
How it works
- Starts from a manual run or a public n8n Form submission that captures niche, city, country, result limit, scraping depth, and robots.txt preference.
- Validates and normalizes the inputs, builds the Google Places text query, and initializes pagination state.
- Calls the Google Places API (Text Search) and paginates through results until it reaches the configured maximum or hits a controlled stop condition.
- For each returned place, prepares a per-business enrichment job, normalizes and validates the website domain to prevent unsafe requests, and optionally fetches and evaluates robots.txt before scraping.
- Requests the business homepage and a small set of internal pages (basic or expanded depth) to extract emails, phone numbers, WhatsApp links, social profiles, and selected JSON-LD fields with source URLs.
- Builds a verified prospect record with confidence and status labels, keeps only the permanent schema, and upserts it into Google Sheets using Place ID or (if missing) the normalized domain as the deduplication key.
- Produces an execution summary with counts by status (complete, partial, blocked, no website, and controlled errors).
Setup
- Create a Google Places API key and set it as the environment variable GOOGLE_PLACES_API_KEY in your n8n instance.
- Connect Google Sheets credentials and replace CONFIGURE_SPREADSHEET_ID with your target spreadsheet ID.
- Ensure your spreadsheet has a sheet named “Prospectos” with columns matching the workflow’s output fields (including Place ID and Dominio normalizado for upserts).
- If using the form trigger, copy the generated form URL path (descubridor-prospectos-b2b) and share it with users who will submit prospecting requests.