Track and classify Facebook ad angles with Apify, OpenAI, and Supabase
UnknownWhat this workflow does
This AI workflow has 15 nodes and runs from “Set Dataset Inputs” (no trigger node, so run it manually or call it from another workflow). Along the way it connects OpenAI, Supabase, Supabase Vector Store and Embeddings OpenAI and 1 more.
How it runs
Trigger: From “Set Dataset Inputs” (no trigger node, so run it manually or call it from another workflow).
- Set Dataset Inputs (Edit Fields (Set)): sets 3 fields: adLibraryUrl, maxAds, adLibraryUrlUk
- Scrape Facebook Ads (Apify): run actor and get dataset
- Compile Ad Data (Code): runs custom JavaScript code
- AI Classify Ad Angle (OpenAI): uses OpenAI
- Check Ad Destination (Filter): keeps only the items that match a condition
- Assemble Ad Information (Code): runs custom JavaScript code
- Fetch Shopify Data (HTTP Request): calls an HTTP API
- Insert Ad to Supabase (Supabase): uses Supabase
- Compile Product Data (Code): runs custom JavaScript code
- Filter: keeps only the items that match a condition
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @apify/n8n-nodes-apify is verified or supports 3.0 (used in Scrape Facebook Ads).
Nodes used (11)
- Edit Fields (Set)
n8n-nodes-base.set - Apify
@apify/n8n-nodes-apify.apify - Code
n8n-nodes-base.code - OpenAI
@n8n/n8n-nodes-langchain.openAi - Supabase
n8n-nodes-base.supabase - Filter
n8n-nodes-base.filter - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - HTTP Request
n8n-nodes-base.httpRequest - Remove Duplicates
n8n-nodes-base.removeDuplicates
From the author
Quick overview This workflow manually scrapes Facebook Ad Library results via Apify, normalizes each ad and extracts destinations, classifies the ad’s persuasion angle with OpenAI, stores ads and related Shopify product data in Supabase, and embeds ad copy…