by Cristina
Automated Weekly Newsletter with AI Research, Editorial Drafting, and Approval Flow This n8n template demonstrates how to automate the full production cycle of a professional weekly newsletter. It combines AI-powered market research, editorial drafting, compliance validation, and an approval loop — all before creating a final Gmail draft ready for distribution. Use cases are many: Wealth managers sending weekly market updates to clients Startups producing recurring research digests Teams creating automated newsletters for marketing or content distribution Good to know At time of writing, each AI call (research, editorial, QC) consumes API tokens from Perplexity and OpenAI. See provider pricing for updated info. Gmail integration requires OAuth setup with your account. You can adapt the prompts to any domain — from finance to tech to education. How it works Schedule Trigger runs every week and sets the date window. Research LLM fetches structured JSON market data using Perplexity. Editorial LLM transforms research into a polished ~2,000 word client-ready newsletter. QC LLM validates factual accuracy and compliance risks before approval. Preview Email is sent with Approve/Revise buttons. Clicking opens a secure n8n-hosted approval form. Final Draft Creation: Once approved, the workflow generates a clean Gmail draft, ready to send. How to use Replace the demo schedule trigger with your own (weekly, daily, or event-based). Set up Gmail OAuth credentials to enable email previews and final drafts. Update branding (logo, disclaimer, signature) in the HTML builder node. Adjust prompts to your audience — e.g., simplify tone for marketing, or keep institutional tone for financial clients. Requirements Perplexity account for research API (or your LLM of choice) OpenAI for editorial and QC steps (or your LLM of choice) Gmail account with OAuth credentials Optional: your own domain to host the approval webhook Customising this workflow This workflow can be extended beyond financial newsletters. Try: Content marketing: Automate weekly digests or trend reports Education: Generate curriculum summaries with approval loops for teachers Internal comms: Automate compliance-checked company updates
by Rahul Joshi
Description Automatically qualify and route new leads from a Google Sheet into your CRM with AI-powered scoring and instant sales notifications. Turn raw form submissions into prioritized opportunities—effortlessly. ⚡ What This Template Does Monitors a Google Sheet for new form submissions. 📄 Uses Azure OpenAI (GPT-4o-mini) to analyze lead details (value, stage, company) and generate action items. 🤖 Parses the AI response into clean JSON for structured processing. 🗂️ Saves qualified lead data and AI-generated action items into a Lead Status sheet for tracking. 💾 Categorizes leads into Hot, Warm, or Cold based on AI scoring. 🔥❄️ Creates/updates the contact in HighLevel CRM. 📇 Sends an email notification to the assigned sales rep with lead details and priority. 📧 Key Benefits Save time with automated lead qualification instead of manual checks. ⏱️ Ensure consistent Hot/Warm/Cold scoring across all leads. ✅ Centralize lead data in both Google Sheets and CRM for tracking. 📊 Keep sales teams aligned with instant notifications. 🚀 Fully no-code configurable and customizable for your business logic. 🧩 Features Google Sheets Trigger for new form rows. 📥 AI Agent with Azure OpenAI (GPT-4o-mini) for lead scoring. 🧠 JSON parsing node to clean AI output. ✂️ Lead logging to “Lead Status” sheet. 📊 Function node to categorize leads by score. 🎯 CRM sync with HighLevel to update/create contact records. 🔗 SMTP email notification to sales reps. ✉️ Requirements n8n instance (cloud or self-hosted). 🧰 Google Sheet with headers: Lead Name, Lead Email, Lead Contact No., Company Name, Opportunity Value, Stage of Lead; shared with n8n Google account. 📑 Azure OpenAI access with a GPT-4o-mini deployment. ☁️ HighLevel CRM account connected via OAuth. 📇 SMTP email account configured in n8n. 📧 Target Audience Sales teams handling inbound leads. 📈 Agencies managing multiple client pipelines. 🤝 Founders/startups wanting quick qualification and CRM sync. 🚀 Ops teams needing reliable reporting of lead qualification. 🗂️ Step-by-Step Setup Instructions (Concise) Create a Google Sheet with required headers; share with n8n account. 📋 Configure the Google Sheets Trigger with the sheet’s Document ID. 🔐 Connect your Azure OpenAI credentials and link to the AI Agent node. 🧠 Assign your HighLevel CRM account credentials. 📇 Set up SMTP credentials for the email send node. ✉️ Import the workflow, update node configs, and run a test submission. ▶️ Security Best Practices Share Google Sheets only with the n8n Google account (Editor). 🔒 Keep API keys and credentials encrypted in n8n, not hardcoded. 🛡️ Validate AI outputs before saving to CRM (via the parse node). ✅ Regularly back up your Lead Status sheet and CRM data. 📂
by Abdullah Alshiekh
📈 Automated Customer Rewards Platform: Jotform Integration This blueprint details a highly efficient, AI-powered workflow designed to automate customer reward fulfillment. Leveraging the accessible interface of Jotform, this system delivers superior reliability and exceptional processing speed. 📊 Reliability, Productivity, and Performance This workflow is engineered to maximize operational efficiency and maintain data integrity: Instant Fulfillment: Automation handles receipt scanning (OCR), AI calculation, logging, and notification in seconds, eliminating manual delays. Seamless Data Capture: Leverages the user-friendly Jotform interface for fast, reliable customer submission and file uploads. 🛠️ Quick Configuration Guide Jotform Webhook:* In your *JotForm* settings, paste the n8n *Jotform Trigger URL** into the Webhook Integration. Done. API Access:* Generate a *"Full Access"** JotForm API key and insert it into the required n8n nodes (Jotform Trigger and Fetch All Receipts). Credential Setup:** Plug in your necessary API keys (Gemini, OCR.Space) and update the Notion Database ID and internal email recipient. 🚀 How It Works (Practical Flow) Submission:* Customer submits their request via *Jotform**. Processing:** System extracts text from the receipt (OCR), the AI calculates the reward, and the If node verifies the total. Fulfillment:** Transaction logged, confirmation emails sent to both the customer and the internal team. If you need any help Get in Touch
by PollupAI
Who's it for This template is for Customer Success and Sales teams who use HubSpot. It automates the critical handoff from sales to success, ensuring every new customer gets a fast, personalized welcome. It's perfect for anyone looking to standardize their onboarding process, save time on manual tasks, and improve the new customer experience using AI. What it does This workflow triggers when a deal's "Is closed won" property is set to True in HubSpot. It assigns a Customer Success Manager (CSM) by querying an n8n Data Table to find the 'least busy' CSM (based on a deal count) and fetches the deal's details to find all associated contacts. It then loops to identify the "Champion" contact by checking their "Buying Role" (hs_buying_role). An AI agent (in the AI: Write Welcome Email node) generates a personalized welcome email, which is converted to HTML and sent via Gmail. Finally, the workflow updates the Champion's contact record in HubSpot and updates the CSM's deal count in the Data Table to keep the logic in sync. How to set up Create and Populate Data Table: This template requires an n8n Data Table to manage CSM assignments. Create a Data Table named csm_assignments. Add two columns: csm_id (String) and deal_count (Number). Add one row for each CSM with their HubSpot Owner ID and a starting deal_count of 0. Link Data Table Nodes: Open the Get CSM List and Increment CSM Deal Count nodes and select the csm_assignments table you just created from the Table dropdown. Configure Variables: In the Configure Template Variables node, you must set your sender info (company_name, sender_name, and sender_email). Customize AI Prompt: In the AI: Write Welcome Email node, update the placeholder [Link to Your Video] and [Link to Your Help Doc] links with your own URLs. Check HubSpot Property: This workflow assumes you use the "Buying Role" (hs_buying_role) contact property to identify your "Champion". If you use a different property, you must update the HubSpot: Get Contact Details and If Role is 'Champion' nodes. Requirements Access to n8n Data Tables. HubSpot (Developer API):** A credential for the Trigger: Deal Is 'Closed Won' node. HubSpot (OAuth2):** A credential for all other HubSpot nodes (Get Deal Details, Get Contact Details, Assign Contact Owner). AI Credentials:** (e.g., OpenAI) Credentials for the AI Model node (the node connected to AI: Write Welcome Email). Email Credentials:** (e.g., Gmail) Credentials for the Gmail: Send Welcome Email node. How to customize the workflow You can easily customize this workflow to send different emails based on deal properties. Add an If node after the HubSpot: Get Deal Details node to check for the deal's value, product line, or region. Based on these properties, you can route the flow to different AI: Write Welcome Email nodes with unique prompts. For example, you could check the contact's 'industry' or 'company size' to send them links to different, more relevant 'Getting Started' videos and documentation.
by Cheng Siong Chin
How It Works MQTT ingests real-time sensor data from connected devices. The workflow normalizes the values and trains or retrains machine learning models on a defined schedule. An AI agent detects anomalies, validates the results for accuracy, and ensures reliable alerts. Detected issues are then routed to dashboards for visualization and sent via email notifications to relevant stakeholders, enabling timely monitoring and response. Setup Steps MQTT: Configure broker connection, set topic subscriptions, and verify data flow. ML Model: Define retraining schedule and specify historical data sources for model updates. AI Agent: Connect Claude or OpenAI APIs and configure anomaly validation prompts. Alerts: Set dashboard URL and email recipients to receive real-time notifications. Prerequisites MQTT broker credentials; historical training data; OpenAI/Claude API key; dashboard access; email service Use Cases IoT sensor monitoring; server performance tracking; network traffic anomalies; application log analysis; predictive maintenance alerts Customization Adjust sensitivity thresholds; swap ML models; modify notification channels; add Slack/Teams integration; customize validation rules Benefits Reduces detection latency 95%; eliminates manual monitoring; prevents false alerts; enables rapid incident response; improves system reliability
by Ibrahim Emre POLAT
How it works Automatically generates professional PDF invoices from webhook data and delivers them via email while storing backups in Google Drive. Perfect for freelancers, small businesses, and service providers who need automated billing workflows. Set up steps Configure environment variables for company information (name, address, email, phone). Set up your PDF generation API service account (PDFShift recommended). Configure SMTP email credentials for invoice delivery. Set up Google Drive OAuth2 for cloud storage. Deploy the workflow and test with sample invoice data. Key features Smart invoice number generation if not provided Automatic tax calculations with configurable rates Professional HTML templates with company branding Parallel processing for email and storage Comprehensive error handling and validation Detailed success confirmation responses Required environment variables COMPANY_NAME - Your business name COMPANY_ADDRESS - Business mailing address COMPANY_EMAIL - Billing contact email COMPANY_PHONE - Business phone number PDF_API_URL - PDF generation service endpoint PDF_API_KEY - API authentication key GDRIVE_INVOICE_FOLDER_ID - Google Drive folder ID API requirements PDF generation service (PDFShift, HTML/CSS to PDF API, or similar), SMTP email service for delivery, Google Drive API access for storage. Input format { "customerName": "John Smith", "customerEmail": "john@example.com", "items": [ {"description": "Web Design", "quantity": 1, "price": 500} ], "dueDate": "2025-02-15" }
by Mahmoud Shrouf
Overview Automate your personal productivity with this intelligent n8n workflow that integrates Telegram, Google Sheets, and OpenAI (GPT-4o). This system uses multiple AI agents to manage work hours, tasks, finances, and emails—all through natural language commands sent via Telegram. Every action is synced to Google Sheets for persistent, structured data storage. What This Template Does This automation system deploys several specialized AI agents: 📊 Work Hours Analyzer**: Analyzes work logs from Google Sheets, calculates total hours by workplace, and generates detailed monthly reports in Arabic. 🛠️ Work Tracking Agent**: Handles start/end work commands, calculates total hours, and updates Google Sheets. 📋 Task Manager Agent**: Manages to-do lists—adding, listing, updating, completing, and deleting tasks—with real-time sync to Google Sheets. 💰 Finance Agent**: Tracks income and expenses in multiple currencies, summarizes daily financial activity, and maintains a full transaction history. 📧 Email Analysis Agent**: Processes incoming Gmail messages, generates AI-powered summaries in Arabic with priority, sentiment, and recommended actions. 📅 Monthly Report Generator**: Automatically triggers at the start of each month to compile a professional PDF report of work hours and sends it to a Telegram topic. Prerequisites & Setup Required Accounts & API Keys Before setup, ensure you have: Telegram Bot Token – from @BotFather OpenAI API Key – with access to gpt-4o-mini or gpt-3.5-turbo Google Sheets API – OAuth2 credentials enabled Gmail Account (Optional) – for email analysis n8n Instance – self-hosted or cloud Google Sheets Structure Create a Google Sheet with the following sheets and columns: Sheet: work Date start at end at place note Total hours Sheet: task Task Status Created At Due Date Notes Sheet: Expenses id Amount Currency Note Type (debit/credit) Date Time Sheet: email name email Step-by-Step Setup Step 1: Import the Workflow In n8n, go to Workflows > Import from file Upload the JSON template Open the canvas and verify all nodes are connected Step 2: Configure Credentials Telegram: Add your bot token under "Telegram account" OpenAI: Enter your API key in "OpenAi account" Google Sheets: Connect using OAuth2 under "Google Sheets account" Gmail (Optional): Set up if using email analysis Step 3: Link Google Sheets Share your Google Sheet with the service account email (if using service account) Copy the Document ID from the sheet URL Update all Google Sheets nodes with the correct sheet names and IDs Ensure column names match exactly Step 4: Set Up Telegram Start a chat with your bot Use /start to initialize Ensure chatId and message_thread_id in Telegram nodes match your group/topic Test sending a message like "Start work at the factory" Step 5: Test the Agents Try these sample commands via Telegram: "Start work at the factory" → Logs start time "Finished work" → Logs end time and calculates hours "Add task: pay the bill" → Adds a new task "How much did I spend today?" → Shows today’s expenses "Send last month's report" → Triggers monthly PDF report (on the first of the month) Key Features Smart Work Tracking Automatic time calculation Query by date, place, or period Real-time Google Sheets sync Task Management Add, list, update, complete, delete tasks Friendly, conversational responses Daily summaries of completed and upcoming tasks Financial Tracking Supports multiple currencies (JOD, USD, ILS, etc.) Daily income/expense summaries Full transaction history Arabic-language responses Email Intelligence AI-powered email summaries Priority, sentiment, and action recommendations Plain-text output in Arabic No JSON or code blocks Automated Monthly Reports Triggered on the 1st of each month Generates detailed work hour reports by workplace Outputs clean, formatted PDF Sends directly to Telegram topic Customization Options Modify AI Prompts Edit the systemMessage in any AI agent node to: Change tone (formal, friendly, concise) Add new response formats Support additional commands or languages Extend Functionality Add daily reminders using Schedule Trigger Implement budget alerts when expenses exceed a threshold Add weekly summaries for tasks or work hours Support multi-currency conversion Enhance Telegram Interaction Add inline buttons for quick actions Create shortcuts like /work, /tasks, /finance Use message_thread_id to organize topics Troubleshooting | Issue | Solution | |------|----------| | Bot not responding | Check webhook URL, bot token, and chatId | | Google Sheets not updating | Verify OAuth2 permissions and sheet sharing | | AI not understanding commands | Review prompt clarity and test input phrasing | | Monthly report not sending | Confirm Schedule Trigger timezone and execution time | Benefits ✅ Full automation with minimal user input 📱 Control everything from Telegram 📊 Data stored securely in Google Sheets 📄 Professional PDF reports generated automatically 💬 Natural, friendly Arabic responses 🔁 Seamless sync across all components This template transforms personal productivity by combining AI intelligence with powerful automation—turning simple Telegram messages into structured data, actionable insights, and professional reports.
by Cheng Siong Chin
Introduction Automate price monitoring for e-commerce competitors—ideal for retailers, analysts, and pricing teams. Scrapes competitor sites, extracts pricing/stock data via AI, detects changes, and sends instant alerts for dynamic pricing strategies. How It Works Scrapes competitor URLs via Firecrawl and Apify, extracts data with AI, detects price/stock changes, logs to Google Sheets, and sends Telegram alerts. Workflow Template Trigger → Scrape URL → AI Extract → Parse → Merge Historical → Detect Changes → Update Sheets + Send Telegram Alert Workflow Steps Trigger & Scrape → Manual/scheduled trigger → Firecrawl + Apify fetch competitor data AI Processing → Claude extracts product details → Parses and structures data Change Detection → Reads historical prices → Merges with current data → Identifies updates Output → Logs alerts to Sheets → Updates historical data → Sends Telegram notification Setup Instructions 1. Firecrawl API Get key from dashboard → Add to n8n 2. Apify API Get key from console → Add to n8n → Configure actors 3. AI Model (Claude/OpenAI) Get API key → Add to n8n 4. Google Sheets OAuth2 Create OAuth2 in Google Cloud Console → Authorize in n8n → Enable API 5. Telegram Bot Create via BotFather → Get token & chat ID → Add to n8n 6. Spreadsheet Setup Create Sheet with required columns → Copy ID → Paste in workflow Prerequisites Self-hosted n8n, Firecrawl account, Apify account, Claude/OpenAI API key, Google account (Sheets OAuth2),Telegram bot Customization Add more URLs, adjust scraping intervals, change detection thresholds, switch to Slack/email alerts, integrate databases Benefits Saves 2+ hours daily, real-time tracking, automated alerts, historical analysis, multi-source scraping
by Cheng Siong Chin
Introduction Automates Singapore COE price tracking with AI forecasts and buy/wait recommendations. Weekly scraping collects LTA data, enriches with economic indicators, predicts 6-month trends, and alerts users via Telegram/email—helping car buyers and fleet managers make data-driven purchase decisions while avoiding manual tracking. How it Works Weekly trigger scrapes LTA COE → validates → stores in Google Sheets → calculates indicators → AI forecasts trends → multi-scenario analysis → generates buy/wait signals → sends actionable alerts. Setup Steps Add OpenAI/NVIDIA API credentials in n8n Authenticate Google Sheets and create spreadsheet Configure Telegram bot or Gmail SMTP Set weekly trigger (Thursday 9AM SGT post-bidding) Adjust alert thresholds in conditional nodes Workflow Schedule Trigger → Scrape COE → Validate → Store Sheets → Fetch Historical → Calculate Indicators → AI Prediction → Merge Economics → Multi-Scenario Analysis → Compare Conditions → Generate Dashboard → Send Alerts Workflow Steps Scraping: Fetch LTA COE results with retry logic Validation: Check completeness, flag anomalies Storage: Append timestamped records to Sheets Enrichment: Calculate moving averages, volatility, seasonality AI Analysis: Forecast next 6 months with confidence intervals Decision Engine: Output buy/wait/monitor recommendation Reporting: Create dashboard and send alerts via Telegram/email Prerequisites OpenAI/NVIDIA API key, Google Sheets access, Telegram bot token or Gmail, basic COE category understanding Use Cases First-time buyers timing purchases, fleet operators coordinating bulk acquisitions Customization Add SMS alerts via Twilio, integrate loan calculators for total cost analysis Benefits Saves 5+ hours monthly, captures 10–18% price dips, provides predictive insights (potential $10K–$25K savings)
by Anatoly
Automated Solana News Tracker with AI-Powered Weekly Summaries Never miss important Solana ecosystem updates again. This production-ready workflow automatically scrapes crypto news daily, intelligently filters duplicates, stores everything in Google Sheets, and generates AI-powered weekly summaries every Monday—completely hands-free. 🎯 What It Does: This intelligent automation runs on autopilot to keep you informed about Solana developments without manual monitoring. Every day at 8 AM PT, it fetches the latest Solana news from CryptoPanic, checks for duplicates against your existing database, and stores only new articles in Google Sheets. On Mondays, it takes an extra step: reading all accumulated articles from the past week and using GPT-4.1-mini to generate a concise, factual summary of key developments and investor takeaways. Daily News Collection**: Automatically fetches latest Solana articles from CryptoPanic API Smart Duplicate Detection**: Compares incoming articles against existing database to prevent redundancy Data Validation**: Filters out incomplete articles to ensure data quality Organized Storage**: Maintains clean Google Sheets database with timestamps and descriptions Weekly AI Summaries**: Analyzes accumulated news every Monday and generates 2-3 sentence insights Historical Archive**: Builds searchable database of both raw articles and weekly summaries 💼 Perfect For: Crypto traders tracking market-moving news • SOL investors monitoring ecosystem growth • Blockchain researchers building historical datasets • Content creators sourcing newsletter material • Portfolio managers needing daily briefings • Anyone wanting Solana updates without information overload 🔧 How It Works: The workflow operates in two distinct modes based on the day of the week. During the daily collection phase (Tuesday-Sunday), it runs at 8 AM PT, fetches the latest Solana news from CryptoPanic, formats the data to extract titles, descriptions, and timestamps, checks each article against your Google Sheets database to identify duplicates, filters out any articles that already exist or have missing data, and appends only valid new articles to your "Raw Data" sheet. On Mondays, the workflow performs all daily tasks plus an additional summarization step. After storing new articles, it retrieves all accumulated news from the "Raw Data" sheet, aggregates all article descriptions into a single text block, sends this consolidated information to GPT-4.1-mini with instructions to create a factual, spartan-toned summary highlighting key investor takeaways, and saves the AI-generated summary with a timestamp to the "Weekly Summary" sheet for historical reference. ✨ Key Features: Schedule-based execution**: Runs automatically at 8 AM PT every day without manual intervention Intelligent deduplication**: Title-based matching prevents storing the same article multiple times Data quality control**: Validates required fields before storage to maintain clean dataset Dual-sheet architecture**: Separate sheets for raw articles and weekly summaries for easy access Cost-effective AI**: Uses GPT-4.1-mini (~$0.001 per summary) for extremely low operating costs Scalable storage**: Google Sheets handles thousands of articles with free tier Customizable cryptocurrency**: Easily adapt to track Bitcoin, Ethereum, or any supported coin Flexible scheduling**: Modify trigger time and summary frequency to match your needs 📋 Requirements: CryptoPanic account with free API key (register at cryptopanic.com) Google Sheets with two sheets: "Raw Data" (columns: date, title, descripton, summary) and "Weekly Summary" (columns: Date, Summary) OpenAI API key for GPT-4.1-mini access (~$0.05/month cost) n8n Cloud or self-hosted instance with schedule trigger enabled ⚡ Quick Setup: Register for a free CryptoPanic API key and replace [your token] in the "Get Solana News" HTTP Request node URL. Create a new Google Spreadsheet with two sheets: one named "Raw Data" with columns for date, title, descripton (note the typo in template), and summary; another named "Weekly Summary" with columns for Date and Summary. Connect your Google Sheets OAuth2 credential to all Google Sheets nodes in the workflow. Add your OpenAI API credential to the "Summarize News" node. Test the workflow manually to ensure it fetches news and stores it correctly. Activate the workflow to enable daily automatic execution. 🚨 Please note, that you're not able to get news in real-time with a FREE CryptoPanic API. Consider their pro plan or another platform for real-time news scraping You'll get new that's up to date as of yesterday. 🎁 What You Get: Complete end-to-end automation with concise sticky note documentation at each workflow stage, pre-configured duplicate detection logic, AI summarization with investor-focused prompts optimized for factual analysis without hype, dual-sheet Google Sheets structure for raw data and summaries, flexible schedule trigger you can adjust to any timezone, example data in pinned format showing expected API responses, customization guides for different cryptocurrencies and summary frequencies, and troubleshooting checklist for common setup issues. 💰 Expected Costs & Performance: CryptoPanic API is free with reasonable rate limits for personal use. OpenAI GPT-4.1-mini costs approximately $0.001 per summary, totaling about $0.05 per month for weekly summaries. The workflow typically processes 20-50 articles daily and generates one summary weekly from 140-350 accumulated articles. Daily executions complete in 5-10 seconds, while Monday runs with AI summarization take 15-20 seconds. Google Sheets provides free storage for up to 5 million cells, easily handling years of news data. 🔄 Customization Ideas: Track different cryptocurrencies by changing the currencies parameter (btc, eth, ada, doge, etc.). Adjust the schedule trigger to run at different times matching your timezone. Modify the Monday check condition to generate summaries on different days or multiple times per week. Connect Slack, Discord, or Email nodes to receive instant notifications when summaries are generated. Edit the AI prompt to change tone, detail level, or focus on specific aspects like price action, development updates, or partnerships. Add conditional logic to send alerts only when certain keywords appear in news (like "hack," "partnership," or "upgrade").
by Rahul Joshi
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 Dual-platform integration (Twitter X API + Facebook Graph API). JavaScript logic for merging and normalizing social datasets. GPT-4o-based sentiment classification and keyword extraction. Structured JSON parsing and visualization pipeline. AI-generated HTML summary reports for presentation and sharing. Automated email dispatch via Gmail. Google Sheets logging for audit and debugging. Modular configuration — easily extendable to other social networks. #3 Requirements Twitter OAuth2 credentials for fetching mentions. Facebook Graph API credentials for reading posts and comments. Azure OpenAI (GPT-4o) credentials for sentiment and summary generation. Gmail OAuth2 credentials for automated email delivery. Google Sheets OAuth2 credentials for error logging and tracking. Environment Variables TWITTER_API_KEY FACEBOOK_GRAPH_TOKEN AZURE_OPENAI_API_KEY GMAIL_REPORT_RECIPIENTS GOOGLE_SHEET_ERROR_LOG_ID 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. ✅
by Rahul Joshi
📊 Description Automatically analyze your Instagram posts’ engagement and audience sentiment using GPT-4 to uncover top-performing content and improvement opportunities. 💬📈 This workflow fetches your latest Instagram posts using the Facebook Graph API, evaluates likes, comments, and tone, then generates structured performance insights. The results are logged into Google Sheets, shared via Slack alerts, and emailed through Outlook — empowering your social media team with daily, AI-powered engagement intelligence. 🚀 What This Template Does 1️⃣ Trigger – Runs daily at 10 AM to fetch the latest Instagram posts. ⏰ 2️⃣ Data Fetching – Uses the Facebook Graph API to extract post data, captions, likes, and comments. 📲 3️⃣ Formatting – Cleans and structures post and comment data for analysis. 🧩 4️⃣ AI Evaluation – GPT-4 analyzes engagement metrics and comment sentiment to score post performance. 🤖 5️⃣ Decision Routing – Flags high- and low-performing posts for separate processing. ⚙️ 6️⃣ Notifications – Sends positive performance summaries or negative alerts to Slack. 💬 7️⃣ Logging – Records engagement metrics, sentiment labels, and AI recommendations in Google Sheets. 📊 8️⃣ Reporting – Emails detailed performance summaries to the marketing team via Outlook. 💌 Key Benefits ✅ Automates social performance tracking across Instagram posts ✅ Provides AI-driven sentiment and engagement insights ✅ Flags top or underperforming content for immediate action ✅ Delivers Slack and email reports for team visibility ✅ Centralizes analytics in Google Sheets for trend tracking Features Facebook Graph API integration for Instagram post and comment retrieval GPT-4 sentiment and engagement evaluation Structured JSON insights and recommendations Slack alerts for both positive and negative performance Google Sheets data logging with trend metrics Outlook email reporting for management visibility Customizable scheduling and thresholds Requirements Facebook Graph API credentials connected to your Instagram Business account OpenAI API key for GPT-4 or GPT-4o-mini Slack Bot token with chat:write permissions Google Sheets OAuth2 credentials with edit rights Microsoft Outlook OAuth2 credentials for email delivery Optional environment variables for IDs: SHEET_ID, SLACK_CHANNEL_ID, OUTLOOK_EMAIL Target Audience Marketing and social media teams optimizing engagement 📣 Agencies managing multiple Instagram accounts 🧑💼 Analysts tracking performance metrics and audience tone 📊 Brands automating daily performance reports 📅 Step-by-Step Setup Instructions 1️⃣ Connect your Facebook Graph API to your Instagram Business Account. 2️⃣ Add OpenAI API credentials (use GPT-4 model for best results). 3️⃣ Configure Slack for team notifications and specify the channel ID. 4️⃣ Link Google Sheets and set your sheet ID for data logging. 5️⃣ Connect Microsoft Outlook for daily performance email reports. 6️⃣ Adjust the schedule (default: 10 AM daily) to suit your workflow. 7️⃣ Run a test once, verify data mapping, and enable automation. ✅