Classify and respond to Facebook Messenger inquiries with GPT-4, Slack and Sheets
Ready for 3.0What 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).
- Fetch Facebook Conversations (Graph API) (Facebook Graph API): uses Facebook Graph API
- Slack: uses Slack
- Format Incoming Message Data (Edit Fields (Set)): sets 5 fields: Message, Senders Name, Sender Email…
- 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)
- Route Messages by Category (Switch): routes items into 3 branches
- Slack: send and wait for a reply
- Slack: send and wait for a reply
- Log to Google Sheets – Spam Messages (Google Sheets): append or update
- Check Lead Approval Status (Switch): routes items into 2 branches
- Check Query Approval Status (Switch): routes items into 2 branches
…plus 8 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Google Sheets + Slack templates (1,314) · Other OpenAI + Slack templates (979)
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)
- Error Trigger
n8n-nodes-base.errorTrigger - Slack
n8n-nodes-base.slack - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Facebook Graph API
n8n-nodes-base.facebookGraphApi - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Switch
n8n-nodes-base.switch - Google Sheets
n8n-nodes-base.googleSheets
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…