Analyze Facebook post comment sentiment with OpenAI, Google Sheets, and Gmail
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Facebook Graph API, Google Sheets, Gmail and OpenAI Chat Model.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Configuration (Edit Fields (Set)): sets 9 fields: facebook_post_id, sentiment_categories, openai_model…
- Split Out: splits a list into separate items
- Get Facebook Post (Facebook Graph API): uses Facebook Graph API
- Loop Over Comments (Loop Over Items (Split in Batches)): loops over the items in batches
- Get Facebook Comments Page (Facebook Graph API): uses Facebook Graph API
- Read All Comments for This Post (Google Sheets): uses Google Sheets
- Analyze Comment Sentiment (Sentiment Analysis): scores sentiment with AI, with model: OpenAI Chat Model
- Has Next Page? (If): checks a condition and branches into true / false
- Call 'Analyze Comments Batch' (Execute Sub-workflow): calls another n8n workflow
- Aggregate: combines items into one
…plus 5 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 (14)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Facebook Graph API
n8n-nodes-base.facebookGraphApi - If
n8n-nodes-base.if - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Split Out
n8n-nodes-base.splitOut - Google Sheets
n8n-nodes-base.googleSheets - Aggregate
n8n-nodes-base.aggregate - Gmail
n8n-nodes-base.gmail - Sentiment Analysis
@n8n/n8n-nodes-langchain.sentimentAnalysis - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Wait
n8n-nodes-base.wait - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
Quick overview This workflow fetches comments from a Facebook Page post via the Facebook Graph API, classifies each comment’s sentiment with OpenAI, stores results in Google Sheets, and emails a sentiment breakdown summary via Gmail. How it works 1. Runs…