Hébergement VPS n8n | Automatisation sécurisée et évolutive
Formation n8n en Français : Automatisation & Agents IA
This course is your shooting script to rebuild this workflow live, node by node, with your community. Every value below is copy-paste ready.
Workflow ID: WxNDmriGQmXYuW4O — Open in n8n
A customer sends a message on your Facebook Page (e.g. "Do you have the red backpack in stock?"). A real-time webhook catches it instantly. One AI agent extracts the product name and intent. A second AI agent checks that product against your live Google Sheets inventory and returns a confidence score. If the match is confident enough, the bot replies automatically with the product details; otherwise it sends a safe, on-brand "not available" message — never an AI hallucination. Every conversation is logged to Google Sheets for review.
Facebook Trigger (webhook)
→ Split Out "entry"
→ Split Out "messaging"
→ IF valid customer text? ──false──> Log Skipped Event (Sheets)
│true
▼
Configuration
├──> AI Agent #1: Extract Product & Intent ──┐
└──> Fetch Inventory (Sheets) → Aggregate ────┼──> Merge (combine by position)
▼
Prepare Matching Payload
▼
AI Agent #2: Match Product in Inventory
▼
IF found AND confidence ≥ threshold?
├─true──> Send Reply "Found" ─────┐
└─false─> Send Reply "Not Found"─┼──> Log Conversation (Sheets)
<aside>
You need a Facebook Page + a Facebook App with the Messenger product enabled. This is the only genuinely technical setup step — take your time on it.
</aside>
<table><tr><th>Credential</th><th>Type</th><th>Used by</th><th>How to get it</th></tr><tr><td>Facebook Graph App API</td><td>facebookGraphAppApi</td><td>Trigger node</td><td>developers.facebook.com → Create App (type: Business) → add the "Messenger" product. Copy the App ID and App Secret from Settings → Basic.</td></tr><tr><td>Facebook Graph API</td><td>facebookGraphApi</td><td>Both "Send Facebook Reply" nodes</td><td>In your Facebook App, Messenger → Settings → generate a Page Access Token for your connected Page. This token is what n8n uses to send messages on the Page's behalf.</td></tr><tr><td>OpenAi account</td><td>openAiApi</td><td>Both OpenAI Chat Model nodes</td><td>platform.openai.com → API Keys → create a key, add it as an n8n credential.</td></tr><tr><td>Google Sheets account</td><td>googleSheetsOAuth2Api</td><td>3 Google Sheets nodes</td><td>Standard Google OAuth2 connection in n8n.</td></tr></table>
You'll also need 3 Google Sheets (or 3 tabs in one sheet):
product_name, price, stock