πŸ“Š Analyze social media sentiment & trends from Twitter & Facebook using GPT-4o

⚑ 226 views Β· πŸ“Š Market Research & Insights

πŸ’‘ Pro Tip β€” Twitter’s API is paid now, which makes simple data pulls expensive. ScraperNode is a community node that scrapes Twitter profiles and posts without needing API access.

View All Scrapers

Description

Description

Gain real-time audience intelligence with this cross-platform AI Sentiment Analyzer for Twitter (X) and Facebook. πŸ“ŠπŸ§  This workflow consolidates mentions and comments, performs GPT-4o-powered sentiment and keyword analysis, summarizes audience mood, highlights dominant trends, and sends a polished HTML report via email β€” all automatically. Ideal for marketing and insights teams tracking brand conversations across social platforms. πŸš€πŸ’¬

What This Template Does

1️⃣ Starts manually to fetch the latest Twitter mentions and Facebook post comments. πŸ•ΉοΈ 2️⃣ Merges both datasets into a unified JSON structure for seamless cross-platform analysis. 🧩 3️⃣ Validates incoming API data to ensure completeness before processing. βœ… 4️⃣ Runs a custom JavaScript transformation to normalize all messages and add sentiment placeholders. 🧠 5️⃣ Uses GPT-4o to perform sentiment and keyword trend analysis, returning structured JSON insights. πŸ“ˆ 6️⃣ Parses AI output to extract overall sentiment ratios and detailed post-level analysis. πŸ” 7️⃣ Generates a human-readable HTML summary using GPT-4o β€” featuring emojis, bullet insights, and trend sections. 🎨 8️⃣ Emails the formatted sentiment report directly to the marketing team. βœ‰οΈ 9️⃣ Logs API or runtime errors automatically into Google Sheets for transparent monitoring. 🧾

Key Benefits

βœ… Provides an automated end-to-end pipeline for sentiment intelligence. βœ… Centralizes Twitter and Facebook audience data in one workflow. βœ… Delivers structured insights ready for dashboards or client reporting. βœ… Generates branded HTML summaries that are ready for emailing. βœ… Improves reliability with built-in error tracking and validation layers.

Features

#3 Requirements

Environment Variables

Target Audience

πŸ“ˆ Marketing and insights teams monitoring audience engagement. πŸ’¬ Social media managers analyzing public sentiment. 🧠 Data analysts exploring brand perception trends. πŸ’‘ PR and communications teams managing online reputation. 🧾 Operations or automation teams integrating AI analytics into dashboards.

Step-by-Step Setup Instructions

1️⃣ Connect all API credentials β€” Twitter, Facebook Graph, Azure OpenAI, Gmail, and Google Sheets. 2️⃣ Update your Twitter user ID and Facebook Page ID in the respective nodes. 3️⃣ Confirm the merge and validation logic in the Merge Platform Datasets and Validate API Response nodes. 4️⃣ Check that your Azure OpenAI account has GPT-4o access enabled. 5️⃣ Verify the Gmail recipient and test the β€œSend Email Summary” node for delivery. 6️⃣ Link your Google Sheet with a tab named error log sheet to capture workflow exceptions. 7️⃣ Run the workflow once manually to validate each layer β€” data, AI response, email delivery. 8️⃣ Optionally, schedule it to run daily or weekly for automated sentiment insights. βœ…

πŸ”— Nodes Used

Google Sheets, HTTP Request, Facebook Graph API, Gmail, AI Agent, Azure OpenAI Chat Model

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup