Facebook Page Finder
Finds Facebook page URLs for businesses in the business_leads table that don't yet have a Facebook handle. Uses Apify Google Search actor to search "Business Name" facebook city and extracts matching facebook.com URLs.
What It Does
- Reads businesses from
business_leadswherefacebook IS NULL - For each business, runs a Google search:
"Business Name" facebook <location> - Extracts facebook.com handles from search results
- Updates
business_leads.facebookwith the found handle - Feeds the
facebook_outreachtable for the facebook-outreach skill
How to Run
# Find Facebook pages for all leads missing them
node skills/facebook-page-finder/scripts/facebook-page-finder.js
# Limit to 50 leads
node skills/facebook-page-finder/scripts/facebook-page-finder.js --limit 50
# Dry run (preview without DB writes)
node skills/facebook-page-finder/scripts/facebook-page-finder.js --dry-run
Environment Variables
APIFY_API_KEY=xxx
INSFORGE_CONNECTION_STRING=xxx
Apify Actor
- Actor ID:
nFJndFXA5zjCTuudP(Google Search Results)
Database
- Reads from:
business_leads(wherefacebook IS NULL) - Updates:
business_leads.facebook - After running, use
facebook-url-normalize.jsinfacebook-outreachto populatefacebook_outreachqueue