Generate B2B leads from any city & business type using GMaps, Jina.ai & GPT-5
B2B Leads Gen - ANY (CITY / BUSINESS) IN THE WORLD
🤖 Generate B2B sales leads from Google Maps, enrich data (email) with AI Agent + Jina.ai and save to Airtable.
This workflow generates comprehensive B2B leads, from a selected Business type in ANY CITY IN THE WORLD, including:
- Company name;
- Website;
- Email (enriched with AI Agent);
- Phone number;
- Address;
- Main Language;
- Google Maps location.
More information can be added!
It starts by searching for a specific business type in any city you define. First, it uses an AI agent to build an optimized query for the Official Google Places (GMaps) API. After finding businesses and their basic details, it employs a second, specialized AI web scraping agent to visit each company's website and find a contact email. Finally, all enriched lead data is neatly organized and saved to an Airtable base.
🤔 Who's it for
This workflow is designed for:
- Sales and Business Development Teams looking to automate lead generation and build targeted outreach lists.
- Marketing Professionals who need to gather contact information for campaigns.
- Freelancers and Agencies offering lead generation as a service.
- Anyone who wants to save time on manually searching for business information online.
⚙️ How it works
This workflow automates the entire lead generation process from start to finish:
- Trigger with a Form: The workflow starts when you fill out a simple form, providing the Country, City, and Business Type you want to target.
- AI-Powered Search Query: An AI agent validates your input and constructs an optimized search query for the Google Places API to ensure the best possible results.
- Find Businesses on Google Maps: Using the generated query, the workflow makes an HTTP request to the Google Places API, fetching up to 20 businesses that match your criteria.
- Filter for Quality Leads: It processes the results and filters out any businesses that are not listed as "OPERATIONAL" or do not have a website, ensuring you only get relevant leads.
- AI Email Enrichment: For each valid business, a specialized web scraping AI agent (using Jina AI) visits the company's website. It intelligently navigates the site, following links like
/contactor/about, to find a contact email address. - Save to Airtable: Once a business's information is enriched with an email, the workflow saves the complete lead as a new record in your specified Airtable base.
🚀 How to set up
Follow these steps to get your automated lead generation engine up and running.
1. Create your Airtable Base
First, create a new Airtable base with a table to store your leads. The workflow is configured to map data to the following fields. It's recommended to use these exact names and types for a seamless setup.
| Field Name | Field Type | Description |
| ------------------------- | -------------------- | ------------------------------------------------- |
| Company_name | Single line text | The name of the business. |
| Company_website | URL | The business's website URL. |
| Company_e-mail | Email | The contact email found by the AI scraper. |
| Company_address | Long text | The full physical address of the business. |
| Company_phone | Phone number | The business's international phone number. |
| Primary_type | Single line text | The primary business category from Google Maps. |
| Google_maps_location | URL | A direct link to the business on Google Maps. |
| processed | Single select | A status field, set to "no" by default. |
| create_date | Date ISO (24h) | Automatically records when the lead was added. |
| Language_code | Single line text | The language code of the business name (e.g., en).|
2. Configure the Workflow
- Add Credentials:
- Airtable: Add your Airtable Personal Access Token in Credentials > New > Airtable.
- OpenAI: Add your OpenAI API key in Credentials > New > OpenAI.
- Jina AI: Add your Jina AI API key in Credentials > New > Jina AI.
- Set API Keys and Airtable Info:
- In the workflow, find the Places_API_Key node (a Set node) and paste your Google Places API key into the
Valuefield for thegoogle_places_apivariable. - Select the Create a record node (Airtable).
- In the parameters, select your Airtable credential.
- For the Base and Table parameters, select the base and table you created in the previous step.
- In the workflow, find the Places_API_Key node (a Set node) and paste your Google Places API key into the
- Activate and Launch: Save and activate the workflow. To run it, click "Execute Workflow" and use the form trigger that appears.
✅ Requirements
- An n8n instance.
- An Airtable (free) account.
- A Google Cloud Platform account with the Places API enabled. See manual (Google Places API Setup Guide) for full instructions.
- An OpenAI account and API key.
- A Jina AI account and API key.
🎨 How to customize the workflow
- Adjust the Number of Leads: In the Google Places Search (HTTP Request) node, you can change the
pageSizevalue in the JSONBodyto fetch more or fewer than 20 results per execution. Be mindful of Google's API limits. - Change the AI Model: The workflow uses OpenAI by default. You can swap the GPT-5-mini nodes for other language models like Anthropic, Google Gemini, or a local AI model.
- Add Different Outputs: The workflow includes disabled nodes to save leads to an Excel file (Convert to File) or send a notification to Slack (Finish message). Enable and configure them to add more outputs. You can also replace Airtable with Google Sheets, a CRM, or a database.
- Modify the Scraping Agent: You can edit the prompt in the Web Scraping Agent node to change its behavior. For example, you could instruct it to look for a specific job title's email, a phone number, or other information on the website.
🙋 Need Help?
Need a Professional and Personalized automation
Contact me DevQuick
If you have any questions or get stuck, feel free to ask for help in our community.
Generate B2B Leads from Any City & Business Type using Google Maps, Jina AI, and GPT-5
This n8n workflow automates the process of generating B2B leads by leveraging Google Maps data, Jina AI for web scraping, and an OpenAI GPT model for data enrichment and lead qualification. It allows you to specify a city and business type, then systematically gathers and processes lead information, ultimately storing it in Airtable and notifying a Slack channel.
What it does
- Triggers on Form Submission: The workflow starts when a form is submitted, providing the
cityandbusiness_typefor lead generation. - Initial Data Setup: Sets up initial data for the lead generation process.
- Google Maps Search: Performs a Google Maps search for businesses matching the specified
cityandbusiness_type. - Extracts Business URLs: Extracts the website URLs of the businesses found on Google Maps.
- Batches URLs for Processing: Splits the extracted URLs into manageable batches for efficient processing.
- Scrapes Website Content with Jina AI: For each business URL, it uses Jina AI to scrape the website content.
- Filters Scraped Data: Filters out any empty or invalid scraped content.
- Enriches Data with AI Agent (GPT): Utilizes an AI Agent (powered by an OpenAI Chat Model and Simple Memory) to process the scraped content and extract relevant B2B lead information (e.g., company name, contact details, services, etc.). It uses a structured output parser to ensure consistent data format.
- Checks for Valid AI Output: Verifies if the AI Agent successfully extracted the required lead information.
- Handles Invalid AI Output: If the AI output is invalid, it logs an error to Slack and stops the process for that item.
- Formats Lead Data: Converts the processed lead data into a structured format suitable for storage.
- Adds Leads to Airtable: Stores the enriched lead information in a specified Airtable base.
- Notifies Slack on Completion: Sends a Slack notification once a batch of leads has been successfully processed and added to Airtable.
- Pauses Between Batches: Introduces a short delay between processing batches to manage API rate limits and ensure stability.
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Airtable Account: With a base and table configured to store lead data.
- Jina AI API Key: For web scraping.
- OpenAI API Key: For the GPT-5 (or similar) AI model.
- Slack Account: For notifications.
- n8n Form: To trigger the workflow with
cityandbusiness_typeinputs.
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Credentials:
- Airtable: Set up your Airtable credential with access to your lead database.
- HTTP Request (Jina AI): Configure the HTTP Request node for Jina AI with your API key.
- OpenAI Chat Model: Set up your OpenAI credential with your API key.
- Slack: Configure your Slack credential for notifications.
- Configure Nodes:
- n8n Form Trigger (Node 1225): Ensure the form fields are correctly set up to capture
cityandbusiness_type. - HTTP Request (Node 19 - Google Maps): Verify the Google Maps search URL and parameters.
- HTTP Request (Node 19 - Jina AI): Confirm the Jina AI API endpoint and parameters for scraping.
- AI Agent (Node 1119): Review the prompt and instructions for the AI Agent to ensure it extracts the desired lead information.
- Structured Output Parser (Node 1179): Adjust the schema if the desired output structure from the AI Agent changes.
- Airtable (Node 2): Map the output fields from the AI Agent to the correct columns in your Airtable base.
- Slack (Node 40): Customize the Slack message content.
- Loop Over Items (Node 39): Adjust the batch size if needed.
- Wait (Node 514): Adjust the wait time between batches if necessary.
- n8n Form Trigger (Node 1225): Ensure the form fields are correctly set up to capture
- Activate the Workflow: Once configured, activate the workflow.
- Trigger the Workflow: Submit the n8n form with the desired
cityandbusiness_typeto start generating leads.
Related Templates
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions
Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review
This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.
Ai website scraper & company intelligence
AI Website Scraper & Company Intelligence Description This workflow automates the process of transforming any website URL into a structured, intelligent company profile. It's triggered by a form, allowing a user to submit a website and choose between a "basic" or "deep" scrape. The workflow extracts key information (mission, services, contacts, SEO keywords), stores it in a structured Supabase database, and archives a full JSON backup to Google Drive. It also features a secondary AI agent that automatically finds and saves competitors for each company, building a rich, interconnected database of company intelligence. --- Quick Implementation Steps Import the Workflow: Import the provided JSON file into your n8n instance. Install Custom Community Node: You must install the community node from: https://www.npmjs.com/package/n8n-nodes-crawl-and-scrape FIRECRAWL N8N Documentation https://docs.firecrawl.dev/developer-guides/workflow-automation/n8n Install Additional Nodes: n8n-nodes-crawl-and-scrape and n8n-nodes-mcp fire crawl mcp . Set up Credentials: Create credentials in n8n for FIRE CRAWL API,Supabase, Mistral AI, and Google Drive. Configure API Key (CRITICAL): Open the Web Search tool node. Go to Parameters → Headers and replace the hardcoded Tavily AI API key with your own. Configure Supabase Nodes: Assign your Supabase credential to all Supabase nodes. Ensure table names (e.g., companies, competitors) match your schema. Configure Google Drive Nodes: Assign your Google Drive credential to the Google Drive2 and save to Google Drive1 nodes. Select the correct Folder ID. Activate Workflow: Turn on the workflow and open the Webhook URL in the “On form submission” node to access the form. --- What It Does Form Trigger Captures user input: “Website URL” and “Scraping Type” (basic or deep). Scraping Router A Switch node routes the flow: Deep Scraping → AI-based MCP Firecrawler agent. Basic Scraping → Crawlee node. Deep Scraping (Firecrawl AI Agent) Uses Firecrawl and Tavily Web Search. Extracts a detailed JSON profile: mission, services, contacts, SEO keywords, etc. Basic Scraping (Crawlee) Uses Crawl and Scrape node to collect raw text. A Mistral-based AI extractor structures the data into JSON. Data Storage Stores structured data in Supabase tables (companies, company_basicprofiles). Archives a full JSON backup to Google Drive. Automated Competitor Analysis Runs after a deep scrape. Uses Tavily web search to find competitors (e.g., from Crunchbase). Saves competitor data to Supabase, linked by company_id. --- Who's It For Sales & Marketing Teams: Enrich leads with deep company info. Market Researchers: Build structured, searchable company databases. B2B Data Providers: Automate company intelligence collection. Developers: Use as a base for RAG or enrichment pipelines. --- Requirements n8n instance (self-hosted or cloud) Supabase Account: With tables like companies, competitors, social_links, etc. Mistral AI API Key Google Drive Credentials Tavily AI API Key (Optional) Custom Nodes: n8n-nodes-crawl-and-scrape --- How It Works Flow Summary Form Trigger: Captures “Website URL” and “Scraping Type”. Switch Node: deep → MCP Firecrawler (AI Agent). basic → Crawl and Scrape node. Scraping & Extraction: Deep path: Firecrawler → JSON structure. Basic path: Crawlee → Mistral extractor → JSON. Storage: Save JSON to Supabase. Archive in Google Drive. Competitor Analysis (Deep Only): Finds competitors via Tavily. Saves to Supabase competitors table. End: Finishes with a No Operation node. --- How To Set Up Import workflow JSON. Install community nodes (especially n8n-nodes-crawl-and-scrape from npm). Configure credentials (Supabase, Mistral AI, Google Drive). Add your Tavily API key. Connect Supabase and Drive nodes properly. Fix disconnected “basic” path if needed. Activate workflow. Test via the webhook form URL. --- How To Customize Change LLMs: Swap Mistral for OpenAI or Claude. Edit Scraper Prompts: Modify system prompts in AI agent nodes. Change Extraction Schema: Update JSON Schema in extractor nodes. Fix Relational Tables: Add Items node before Supabase inserts for arrays (social links, keywords). Enhance Automation: Add email/slack notifications, or replace form trigger with a Google Sheets trigger. --- Add-ons Automated Trigger: Run on new sheet rows. Notifications: Email or Slack alerts after completion. RAG Integration: Use the Supabase database as a chatbot knowledge source. --- Use Case Examples Sales Lead Enrichment: Instantly get company + competitor data from a URL. Market Research: Collect and compare companies in a niche. B2B Database Creation: Build a proprietary company dataset. --- WORKFLOW IMAGE --- Troubleshooting Guide | Issue | Possible Cause | Solution | |-------|----------------|-----------| | Form Trigger 404 | Workflow not active | Activate the workflow | | Web Search Tool fails | Missing Tavily API key | Replace the placeholder key | | FIRECRAWLER / find competitor fails | Missing MCP node | Install n8n-nodes-mcp | | Basic scrape does nothing | Switch node path disconnected | Reconnect “basic” output | | Supabase node error | Wrong table/column names | Match schema exactly | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. Contact: shilpa.raju@digitalbiz.tech For more such offerings, visit us: https://www.digitalbiz.tech ---