Skip to main content

Analyze Facebook comment sentiment with GPT-4, Slack, Sheets & Outlook reports

Workflow preview

Workflow preview
100%
Analyze Facebook comment sentiment with GPT-4, Slack, Sheets & Outlook reports preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description Automatically analyze the sentiment of Facebook posts and their audience comments using GPT 4 to identify trends and potential PR risks. This workflow fetches recent posts via t...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.errortrigger, n8n-nodes-base.slack, n8n-nodes-base.facebookgraphapi, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rahul Joshi.

Original n8n.io source

1.1 Workflow description

Title
Analyze Facebook comment sentiment with GPT-4, Slack, Sheets & Outlook reports
Workflow name
Analyze Facebook comment sentiment with GPT-4, Slack, Sheets & Outlook reports

πŸ“Š Description

Automatically analyze the sentiment of Facebook posts and their audience comments using GPT-4 to identify trends and potential PR risks. πŸ§ πŸ’¬ This workflow fetches recent posts via the Facebook Graph API, performs AI-powered sentiment analysis on both posts and comments, routes negative results to Slack for immediate attention, logs all data into Google Sheets, and sends a beautifully formatted sentiment summary report via Outlook. πŸ“ˆπŸ“§

What This Template Does

1️⃣ Trigger – Runs daily at 10 AM to fetch the latest Facebook posts. ⏰ 2️⃣ Data Extraction – Pulls post text, reactions, and up to 100 comments per post using Facebook Graph API. πŸ“² 3️⃣ Formatting – Structures and cleans Facebook data for AI analysis. 🧩 4️⃣ AI Sentiment Analysis – GPT-4 evaluates post tone and audience sentiment with confidence scores and explanations. πŸ€– 5️⃣ Routing – Sends negative sentiment alerts directly to Slack for quick response. ⚠️ 6️⃣ Logging – Records all sentiment metrics in Google Sheets, including positivity ratio and engagement data. πŸ“Š 7️⃣ Reporting – Generates a color-coded HTML email report and delivers it via Outlook. πŸ’Œ 8️⃣ Error Handling – Sends Slack alerts if any node in the workflow fails. πŸ›‘οΈ

Key Benefits

βœ… Monitors brand reputation automatically across Facebook comments βœ… Provides structured AI sentiment reports for data-driven decisions βœ… Flags negative audience sentiment for timely intervention βœ… Maintains an always-updated sentiment log in Google Sheets βœ… Delivers professional HTML summary emails to teams

Features

  • Automated daily trigger for post sentiment scanning
  • Facebook Graph API integration for posts and comments
  • GPT-4–powered comment tone and sentiment scoring
  • Slack notifications for negative sentiment alerts
  • Google Sheets sentiment dashboard logging
  • Beautiful HTML report delivery through Microsoft Outlook
  • Built-in error detection with Slack fallback alerts

Requirements

  • Facebook Graph API credentials with pages_read_engagement access
  • OpenAI API key for GPT-4 or GPT-4o
  • Slack Bot token with chat:write permission
  • Google Sheets OAuth2 credentials with edit rights
  • Microsoft Outlook OAuth2 credentials for email delivery

Target Audience

  • Social media and marketing teams monitoring brand perception πŸ“£
  • PR teams managing engagement or audience sentiment 🧾
  • Analysts building data dashboards from engagement metrics πŸ“Š
  • Agencies offering automated reporting for client pages πŸ§‘β€πŸ’Ό

Step-by-Step Setup Instructions

1️⃣ Connect Facebook Graph API credentials and set your page ID. 2️⃣ Add OpenAI credentials for GPT-4 sentiment analysis. 3️⃣ Configure Slack and provide your channel ID for alerts. 4️⃣ Set Google Sheets credentials and specify sheet ID and name. 5️⃣ Connect Microsoft Outlook for email report delivery. 6️⃣ Adjust the daily schedule (default 10 AM) as needed. 7️⃣ Run once manually to verify setup, then enable automation. βœ…

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Main Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Data Collection Group

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - AI Analysis Group

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Routing Logic

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Alerts & Reporting

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Error Handling

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Error Handler Trigger

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 8 - Slack: Send Error Alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 9 - Fetch Recent Facebook Posts

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 10 - πŸ’¬ Agent - Sentiment & Tone Evaluator

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 11 - Route Based on Sentiment Score

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 12 - Slack Alert - Negative Sentiment

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - LLM - OpenAI GPT-4 Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 15 - Memory Buffer - Session Context

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 16 - Structured JSON Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 17 - Format Facebook Data (Code Node)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Trigger - Daily Sentiment Analysis

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 19 - Format HTML Email Report (Code Node)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Prepare Data for Google Sheets

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Update Google Sheet - Sentiment Log

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 22 - Send Sentiment Report (Outlook)

Type / Role
n8n-nodes-base.microsoftOutlook - microsoftOutlook
Config choices
Version 2

3. Summary Table

Workflow Analyze Facebook comment sentiment with GPT-4, Slack, Sheets & Outlook reports
Complexity advanced
Nodes 22
Categories Market Research, AI Summarization
Author Rahul Joshi
Published 14 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10821/10821.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze Facebook comment sentiment with GPT-4, Slack, Sheets & Outlook reports do?

Description Automatically analyze the sentiment of Facebook posts and their audience comments using GPT 4 to identify trends and potential PR risks. This workflow fetches recent posts via t...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.