Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Monitoring, Ops & Incidents

Monitoring, Ops & Incidents

Monitor Facebook Ad Performance and Email Alerts

Every hour, the workflow scrapes a Facebook ads dashboard through Bright Data MCP, has OpenAI evaluate performance and emails alerts for underperforming ads.

What it does

# 🚨 Smart Ad Monitor: Auto-Scrape Facebook Ads & Alert on Underperformance (via Bright Data MCP) --- ## 🎯 Workflow Goal: Automatically monitor Facebook Ads (via Bright Data MCP), analyze performance, and send alerts if ads are underperforming. --- ## 🧩 SECTION 1: Trigger & Input Setup 🔁 Check Ads Every Hour + 📥 Set Query Input (Brand or URL) 📍 *Nodes: Schedule Trigger, Edit Fields* ### 🔧 What Happens: * 🔁 Schedule Trigger fires the workflow automatically (e.g., every hour). * 📥 Edit Fields lets you define what brand or keyword to track (e.g., “Nike”). ### 🧑‍💼 For Beginners: This section is like setting the alarm clock ⏰ and telling the system what you're looking for. You don’t need to code—just input the keyword (like “Nike”) and the rest is automatic. --- ## 🤖 SECTION 2: Scrape Ads via AI Agent (Bright Data MCP) 🧠 Scrape Ads via MCP Agent 📍 *Node: AI Agent (with sub-nodes: OpenAI Chat, MCP Client, Structured Output Parser)* ### 🔧 What Happens: * 🧠 AI Agent uses Bright Data MCP to simulate a real user and scrape ad data from the Facebook Ads Library. * It sends the query input from Section 1 and fetches ad performance data (CTR, CPA, media, text, etc.). * The result is parsed cleanly into JSON. ### 🤖 Behind the Scenes: * 🔐 Logs in with mobile headers via Bright Data MCP * 📄 Extracts only relevant ad details * 🤖 Uses OpenAI model to structure & clean the output ### 🧑‍💼 For Beginners: You don’t have to worry about scraping code or browser automation. This AI Agent does the dirty work, like a robot assistant crawling Facebook ads and bringing back a summary of ad performance. --- ## 🔎 SECTION 3: Process a Single Ad & Check If It's Underperforming 🔄 Return One Ad at a Time + 🚨 Is Ad Underperforming? 📍 *Nodes: Code, If* ### 🔧 What Happens: * 🔄 Code Node reads the list of ads from the agent and returns only one ad per run. It uses n8n’s memory to remember which ad was shown last and avoids repeats. * 🚨 If Node checks: * Is CTR less than 1%? * Is CPA greater than \$10? If both are true, it's considered underperforming. ### 🧑‍💼 For Beginners: Think of this like flipping through a file one page at a time 📄. The system checks each ad: “Is this one bad?”—if yes, it takes action. If no, it skips quietly. --- ## 📬 SECTION 4: Take Action Based on Ad Quality 📬 Send Alert Email + ✅ Do Nothing (Ad is OK) 📍 *Nodes: Gmail, No Operati

The steps

  1. OpenAI Chat Model
  2. MCP Client
  3. 🔁 Check Ads Every Hour
  4. 📥 Set facebook ad dashboard URL
  5. 🧠 Scrape Ads via MCP Agent
  6. 🔄 Return One Ad at a Time
  7. 🚨 Is Ad Underperforming?
  8. 📬 Send Alert Email
  9. ✅ Do Nothing (Ad is OK)
  10. Auto-fixing Output Parser
  11. OpenAI Chat Model1
  12. Structured Output Parser1

Similar automations