Hébergement VPS n8n | Automatisation sécurisée et évolutive
Formation n8n en Français : Automatisation & Agents IA
This course lets you rebuild the workflow manually, node by node, live with your community. Everything below is copy-paste ready.
It fetches all comments on a Facebook Page post, classifies each comment's sentiment with OpenAI, stores the results in Google Sheets, and — once every comment on a page has been processed — emails you an executive summary with the sentiment breakdown.
The whole template lives in one single importable JSON file: it has two triggers. A Manual Trigger fetches the post and paginates through its comments. An Execute Workflow Trigger lets the workflow call itself to batch-process each page of comments (sentiment analysis, sheet write, summary email). This self-reference pattern keeps everything modular without needing a second file.
| Credential | Type | Used by | How to get it |
|---|---|---|---|
| Facebook Graph API | facebookGraphApi | Get Facebook Post, Get Facebook Comments Page | Create a Facebook App at developers.facebook.com, generate a Page Access Token with pages_read_engagement • pages_read_user_content scopes, then add it as a new n8n credential of type "Facebook Graph API". |
| OpenAI account | openAiApi | OpenAI Chat Model | Grab an API key from platform.openai.com/api-keys, paste it into a new n8n OpenAI credential. |
| Google Sheets account | googleSheetsOAuth2Api | Save Comment to Google Sheets, Read All Comments for This Post | Connect via OAuth2 in n8n; make sure the connected Google account has Editor access to the target spreadsheet. |
| Gmail account | gmailOAuth2 | Send Sentiment Summary Email | Connect via OAuth2 in n8n (same Google account works if it also has Gmail scope). |
<aside> 📄
Your Google Sheet needs 4 columns: POST ID, COMMENT ID, COMMENT, SENTIMENT. Create it before your first test run.
</aside>
n8n-nodes-base.manualTrigger (v1)Standard Manual Trigger, no configuration. This is the entry point you click to fetch a post and kick off the whole pipeline.
n8n-nodes-base.set (v3.4)