Extract and analyze 🔬 ALL Facebook post comments with sentiment AI using Gemini
This workflow automates the process of collecting, analyzing, and storing Facebook post comments with AI-powered sentiment analysis about YOUR Facebook Page.
Typical Use Cases:
Social media sentiment monitoring Brand reputation analysis Campaign performance evaluation Community management and moderation insights Reporting and analytics for marketing teams
Key Advantages
✅ 1. Full Automation
Eliminates manual work by automatically collecting and analyzing Facebook comments end-to-end.
✅ 2. AI-Powered Sentiment Analysis
Uses Google Gemini to accurately classify user sentiment, enabling deeper insights into audience perception and engagement.
✅ 3. Structured Data Storage
Saves results directly into Google Sheets, making the data easy to analyze, share, and visualize with dashboards or reports.
✅ 4. Duplicate-Safe Updates
The “append or update” logic ensures comments are not duplicated and can be refreshed if sentiment analysis changes.
✅ 5. Scalable and Robust
Pagination handling, batch processing, and wait nodes allow the workflow to scale to large volumes of comments without hitting API limits.
✅ 6. Modular Architecture
The use of sub-workflows makes the solution reusable and easy to integrate into larger automation pipelines (e.g. monitoring multiple posts or pages).
✅ 7. Flexible Triggering
Can be run manually for testing or automatically as part of a broader workflow ecosystem.
How it works
This workflow automates the process of fetching Facebook post comments, performing sentiment analysis on each comment, and storing the results in a Google Sheet. It operates in two modes:
Manual execution mode: Starts with a Manual Trigger, where the user enters a Facebook Post ID. The workflow fetches the post details, then retrieves all comments (including pagination). It calls a separate "Facebook" workflow (via the Call 'Facebook' node) to process each comment batch through sentiment analysis and save results to Google Sheets.
Triggered execution mode: Activated via the "When Executed by Another Workflow" trigger, receiving comment data directly. It splits and batches the incoming comments, processes each through the sentiment analysis model (Google Gemini), and appends/updates records in Google Sheets.
Set up steps
Configure Facebook Graph API credentials: Add your Facebook Graph API credentials to both "Get Fb Post" and "Get Fb comments" nodes.
Set up Google Gemini API credentials: Configure the "Google Gemini Chat Model" node with valid Google PaLM/Gemini API credentials.
Prepare Google Sheet: Ensure the Google Sheet exists and is accessible via the Google Sheets OAuth2 credentials. The sheet should have (or will automatically create) columns: POST ID, COMMENT ID, COMMENT, SENTIMENT.
Configure the sub-workflow call: Ensure the "Call 'Facebook'" node points to a valid, existing workflow that can process comment data.
Optional: Adjust batch and wait settings: Modify the "Loop Over Items" node if different batch sizes are needed. Adjust the "Wait" node delay if required to avoid rate limits.
Activate the workflow: Toggle the workflow to active if scheduled or webhook execution is desired. Test using the Manual Trigger with a sample Facebook Post ID.
👉 Subscribe to my new YouTube channel. Here I’ll share videos and Shorts with practical tutorials and FREE templates for n8n.
Need help customizing?
Contact me for consulting and support or add me on Linkedin.
Related Templates
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
📰 AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments