Automated Facebook message response with GPT-4o and Airtable inventory matching
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on a schedule (every hour). Along the way it connects Airtable, Facebook Graph API, Azure OpenAI Chat Model and Google Sheets.
How it runs
Trigger: On a schedule (every hour).
- Fetch Facebook Conversation List (Facebook Graph API): uses Facebook Graph API
- Fetch Facebook Conversation Messages (Facebook Graph API): uses Facebook Graph API
- Validate Record Structure (If): checks a condition and branches into true / false
- Extract Latest Facebook Message (Code): runs custom JavaScript code
- Log Invalid Records to Google Sheet (Google Sheets): append
- AI – Extract Product & Customer Intent (AI Agent): runs an AI agent, with model: Configure GPT-4o — Message Classification Model
- Fetch Inventory Records from Airtable (Airtable): search
- Merge: merges the data from its input branches
- Build Combined AI + Inventory Payload ( (Code): runs custom JavaScript code
- AI – Match Requested Product in Inventory (AI Agent): runs an AI agent, with model: Configure GPT-4o — Product Matching Model
…plus 4 more steps. See the full node list below.
Services it uses
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 (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Airtable
n8n-nodes-base.airtable - Facebook Graph API
n8n-nodes-base.facebookGraphApi - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - Azure OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets
From the author
📘 Description This workflow automates AI-driven Facebook Messenger product inquiry handling, connecting Facebook DMs with Airtable inventory and returning instant automated replies based on product availability. It runs hourly, fetches new messages, extracts…