workflows.fit
Back to n8n workflows
n8n templateFreeBy Rahul Joshi

Automated Facebook message response with GPT-4o and Airtable inventory matching

πŸ“˜ 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 r...

Data & StorageProductivityDevelopmentCore NodesAILangchainSchedule TriggerAirtable
Loading interactive preview...

Template notes

πŸ“˜ 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 the latest customer query, uses GPT-4o to identify the product and intent, merges this with the Airtable inventory dataset, performs an AI-assisted product match, and replies automatically inside the same Facebook conversation. Invalid or malformed messages are logged to Google Sheets for review.

βš™οΈ What This Workflow Does (Step-by-Step)

▢️ Trigger – Fetch New Facebook Messages (Every Hour) Schedules hourly polling of new conversations from Facebook Messenger.

🟦 Fetch Facebook Conversation List (Graph API) Retrieves conversation threads from the connected Facebook Page.

πŸ’¬ Fetch Facebook Conversation Messages (Graph API) Loads message details (content, sender, timestamp) for the selected conversation.

πŸ“© Extract Latest Facebook Message (Code) Sorts all messages and picks the latest one β†’ this is the message analyzed by AI.

πŸ” Validate Record Structure (IF) Ensures the incoming message has required fields. Valid β†’ AI analysis Invalid β†’ logged to Google Sheets.

πŸ“„ Log Invalid Records to Google Sheet Stores malformed or unprocessable messages for audit and correction.