Templates / Classify and respond to Facebook Messenger inquiries with GPT-4, Slack and Sheets

Classify and respond to Facebook Messenger inquiries with GPT-4, Slack and Sheets

Ready for 3.0

by Rahul Joshi ✓ · 617 views · created 2025-11-06 · Support Chatbot, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 23 nodes and runs on a schedule (every hour) (plus 1 other trigger). Along the way it connects Slack, Facebook Graph API, OpenAI Chat Model and Google Sheets.

How it runs

Trigger: On a schedule (every hour) (plus 1 other trigger).

  1. Fetch Facebook Conversations (Graph API) (Facebook Graph API): uses Facebook Graph API
  2. Slack: uses Slack
  3. Format Incoming Message Data (Edit Fields (Set)): sets 5 fields: Message, Senders Name, Sender Email…
  4. AI – Classify Message (Lead / Query / Spam) (AI Agent): runs an AI agent, with model: Model – GPT-4 Language Model; memory: Memory – Conversation Context Buffer; output parser: Parse AI Output (JSON Parser)
  5. Route Messages by Category (Switch): routes items into 3 branches
  6. Slack: send and wait for a reply
  7. Slack: send and wait for a reply
  8. Log to Google Sheets – Spam Messages (Google Sheets): append or update
  9. Check Lead Approval Status (Switch): routes items into 2 branches
  10. Check Query Approval Status (Switch): routes items into 2 branches

…plus 8 more steps. See the full node list below.

Services it uses

SlackFacebook Graph APIOpenAI Chat ModelGoogle Sheets

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

📊 Description Streamline Facebook Messenger inbox management with an AI-powered categorization and response system. 💬⚙️ This workflow automatically classifies new messages as Lead, Query, or Spam using GPT-4, routes them for approval via Slack, responds on…

Excerpt from Rahul Joshi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.