AutomationFlowsMarketing & Ads › Daily Lead Mining via HTTP API

Daily Lead Mining via HTTP API

Original n8n title: Lead Mining (daily Trigger)

01 - Lead Mining (Daily Trigger). Uses httpRequest. Scheduled trigger; 4 nodes.

Cron / scheduled trigger★★★★☆ complexity4 nodesHTTP Request
Marketing & Ads Trigger: Cron / scheduled Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "01 - Lead Mining (Daily Trigger)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "id": "schedule-trigger",
      "name": "Daily at 8AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const keywords = [\n  { keyword: 'restaurant', location: 'Manila, Philippines' },\n  { keyword: 'retail store', location: 'Cebu City, Philippines' },\n  { keyword: 'hotel', location: 'Davao City, Philippines' },\n  { keyword: 'salon beauty', location: 'Quezon City, Philippines' },\n  { keyword: 'bakery', location: 'Makati, Philippines' },\n];\nreturn keywords.map(k => ({ json: k }));"
      },
      "id": "keyword-list",
      "name": "Keyword List",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://lead-miner:8000/mine",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "keyword",
              "value": "={{ $json.keyword }}"
            },
            {
              "name": "location",
              "value": "={{ $json.location }}"
            },
            {
              "name": "limit",
              "value": 100
            },
            {
              "name": "enrich",
              "value": false
            }
          ]
        },
        "options": {
          "timeout": 60000
        }
      },
      "id": "call-mine-api",
      "name": "Call /mine API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const result = $input.item.json;\nconst summary = {\n  keyword: $('Keyword List').item.json.keyword,\n  location: $('Keyword List').item.json.location,\n  total_mined: result.total,\n  dedup_removed: result.dedup_removed,\n  sources: result.source_counts,\n  errors: result.errors,\n  duration_sec: result.duration_sec,\n  timestamp: new Date().toISOString(),\n};\nconsole.log('Mining done:', JSON.stringify(summary));\nreturn [{ json: summary }];"
      },
      "id": "log-result",
      "name": "Log Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Daily at 8AM": {
      "main": [
        [
          {
            "node": "Keyword List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keyword List": {
      "main": [
        [
          {
            "node": "Call /mine API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call /mine API": {
      "main": [
        [
          {
            "node": "Log Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveExecutionProgress": true,
    "saveManualExecutions": true
  },
  "tags": [],
  "meta": {
    "description": "Daily trigger for Lead Mining Engine \u2014 mine Philippines SME data into PostgreSQL + ChromaDB"
  },
  "id": "7e20d1b3-6adf-4e0c-8c6a-0e8b9a7beeb0"
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

01 - Lead Mining (Daily Trigger). Uses httpRequest. Scheduled trigger; 4 nodes.

Source: https://github.com/kaneliu120/lead-mining-system/blob/9197dfc0289d444b23dc2d461544adc8380bffb8/n8n-workflows/01-lead-mining.json — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Marketing & Ads

Workflow A — WhatsApp Lead Intake & Qualification. Uses postgres, httpRequest, errorTrigger. Scheduled trigger; 67 nodes.

Postgres, HTTP Request, Error Trigger
Marketing & Ads

Build authentic Reddit presence and generate qualified leads through AI-powered community engagement that provides genuine value without spam or promotion.

HTTP Request, Reddit
Marketing & Ads

This workflow runs on scheduled weekly and monthly triggers to generate unified marketing performance reports. It processes multiple websites by collecting analytics data, paid ads performance, and CR

Gmail, Google Sheets, Google Analytics +3
Marketing & Ads

Fetch Multiple Google Analytics GA4 metrics daily, post to Discord, update previous day’s entry as GA data finalizes over seven days. Automates daily traffic reporting Maintains single message per day

Google Analytics, Discord, HTTP Request
Marketing & Ads

WABA Message Journey Flow Documentation This document outlines the automated workflow for sending WhatsApp messages to contacts, triggered hourly and managed through disposition and message count logi

Supabase, HTTP Request