Quick Overview
This workflow runs on demand to discover competitor Facebook pages, fetch their active ads, extract advertised product URLs, scrape product details and pricing via Apify, and then append or update one row per product in Google Sheets.
How it works
- Triggers manually to start a competitor research run.
- Uses Apify’s Facebook Search Scraper to find Facebook pages for the configured categories and locations.
- Aggregates the discovered page URLs and uses Apify’s Facebook Ads Library Scraper to pull active ads for those pages.
- Extracts and aggregates product link URLs found in the ad cards.
- Uses Apify’s E-commerce Scraping Tool to scrape each product page for name, description, price, currency, and an ID.
- Appends or updates matching rows in Google Sheets using the product ID as the unique key.
Setup
- Add an Apify API token credential in n8n and select it in each Apify node.
- Add a Google Sheets OAuth credential and select the target spreadsheet and sheet in the Google Sheets node.
- Create a Google Sheet with columns for Product name, ID, Description, Price, and Currency (note the workflow maps to “Product name ” and “Currency ” with trailing spaces).
- Update the Facebook Search Scraper input (categories, locations, and resultsLimit) to match your market and competitors.