LLM Facebook Competitive Ad Monitoring and Reporting with Apify, Gemini, and OpenAI

This workflow automates competitive ad intelligence by analyzing Facebook Ad Library data, providing insights via AI-driven analysis. Key nodes include Webhook, Condition (API authentication), HTTP Request (Apify, Gemini API), OpenAI (image analysis), Switch (ad type classification), Code (intelligence fusion), and Slack notifications. It processes video, image, and text ads, storing results in a database and generating executive reports. Install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io. Obtain an Apify API key from apify.com for the HTTP Request node ('Ad Library Scraper'). Create a Google Cloud account at console.cloud.google.com for Gemini API credentials for the HTTP Request node ('Video Intelligence'). Get an OpenAI API key from openai.com for the OpenAI node ('Visual Intelligence'). Set up a Slack webhook at slack.com for the HTTP Request node ('Intelligence Notification'). Configure a custom database API key for the HTTP Request node ('Enterprise Database'). Set the Webhook node path to 'ad-intelligence' and ensure the database API endpoint (e.g., https://your-database-api.com/intelligence/ads) is accessible. Define default search parameters in the Set node ('Search Parameter Builder') like keywords='ai automation', country='US'. Test by sending a POST request to the Webhook URL (e.g., curl -X POST http://<n8n-host>/webhook/ad-intelligence -H "x-api-key: devhubconnect-intelligence-key" -d '{"keywords":"ai automation"}'). Verify ad data in the HTTP Request node ('Ad Library Scraper'), analysis in OpenAI and HTTP Request nodes ('Visual Intelligence', 'Video Intelligence'), and database storage in the HTTP Request node ('Enterprise Database'). Check Slack for notifications. Invalid API keys trigger a 401 error in the Condition node ('API Authentication'). No ad data results in an error in the Condition node ('Data Validation Gate'). Deploy by activating the workflow and setting credentials. Monitor Slack for report alerts and the database for stored insights. If video downloads fail, the HTTP Request node ('Video Downloader') retries up to 3 times.

$6.99

Workflow steps: 25

Integrated apps: webhook, if, set

LLM Facebook Competitive Ad Monitoring and Reporting with Apify, Gemini, and OpenAI preview