Facebook Lead Qualifier Agent — Comment webhooks analyzed, scored, and replied — with manager alerts for hot leads.

Facebook Lead Qualifier Agent

Comment webhooks analyzed, scored, and replied — with manager alerts for hot leads.

n8nOpenAIMeta Graph APIGmailWebhooks

Overview

An n8n agent that listens to Facebook Page comment webhooks, classifies each comment for sentiment and lead quality, auto-replies when safe, and emails managers when a high-priority lead or negative comment needs a human.

Problem

Social comments mix greetings, spam, complaints, and real buying intent. Teams cannot read every thread instantly, and replying late — or missing a hot lead — costs conversions.

Solution

Built a webhook pipeline that validates Meta payloads, structures comment data, runs GPT analysis for sentiment, category, lead quality, and reply text, posts public replies via Graph API when appropriate, and routes payment-related or high-priority leads to Gmail alerts.

Architecture

n8n workflow with Meta webhook verification, conditional routing on comment events, OpenAI for structured JSON analysis, HTTP Request for Facebook reply API, and Gmail nodes for manager notifications on negative sentiment or qualified leads.

Workflow

  1. 01 Facebook comment webhook hits n8n
  2. 02 Filter valid new comments and map fields
  3. 03 OpenAI scores sentiment, lead quality, and draft reply
  4. 04 Auto-reply on Graph API when requires_reply is true
  5. 05 Email manager on negative comments or priority leads

Results

  • · Comments classified before a human opens Facebook
  • · Public replies sent for safe, on-brand interactions
  • · High-priority leads surfaced to inbox immediately
  • · Negative comments flagged instead of auto-replied

Want something similar?

Let's talk about your project.

Start a project