by Mychel Garzon
Stop guessing if text came from ChatGPT. Let three AI agents argue about it using forensic data. Paste any text and get a verdict on whether it was written by a human, AI, or a hybrid mix. Instead of trusting one black-box score, this workflow runs your text through statistical analysis and a three-agent debate where each agent challenges the others using hard numbers. This is not another "detect AI with AI" template. The workflow measures six forensic markers first, then makes three separate agents argue about what those numbers mean. You see the raw data, the debate, and the final verdict with confidence scores. How it works The workflow runs in five stages: Extract forensic metrics: A code node measures burstiness (sentence length variation), type-token ratio (vocabulary diversity), hapax rate (words appearing once), repetition score (repeated phrases), transition density (filler words like "furthermore"), and AI fingerprints (100+ known LLM phrases stored in a data table). Short texts under 150 words get recalibrated because metrics are less reliable. Agent 1 - The Scanner: Reads the text cold with zero metrics. Gives a gut impression (human/AI/hybrid) based purely on instinct. Acts like an editor who has read thousands of manuscripts. Agent 2 - Forensic Analyst: Gets the text, all metrics, and Agent 1's verdict. Writes a data-driven report that must cite specific numbers. Either agrees or disagrees with Agent 1 and explains why using the forensic evidence. Agent 3 - Devil's Advocate: Gets everything above and argues the opposite of whatever Agent 2 concluded. If Agent 2 said AI, Agent 3 must argue human. Finds holes in the logic and metrics that got ignored. Weighted verdict: A code node scores all three agents (35% Analyst, 15% Scanner, 15% Devil's Advocate, 35% raw metrics) and classifies as human (score under 0.35), AI (score over 0.60), or AI-augmented (in between). Confidence is calculated separately so you get verdicts like "AI with 67% confidence." Chat output format The chat response shows: Verdict badge:** 🙎🏻 Human-Written, 🤖 AI-Generated, or 🦾 AI-Augmented Confidence bar:** Visual bar (██████████ 85%) showing how certain the verdict is Metrics table:** All six forensic markers with 🟥 AI or 🟩 Human flags Agent debate:** Three verdicts with reasoning. Agent 1's gut check, Agent 2's forensic report, Agent 3's counter-argument. Each shows classification and confidence percentage. Example output for AI text: 🤖 Verdict: AI-Generated Confidence: ████████░░ 87% 📊 Stylometric Metrics: Burstiness: 0.18 🟥 AI Vocabulary Diversity: 0.36 🟥 AI Hapax Rate: 0.32 🟥 AI Repetition: 0.21 🟥 AI Transition Density: 0.024 🟥 AI 🔎 Agent 1 (Gut Check): AI (90%) "Monotonous rhythm, corporate vocabulary, zero personality" 🔬 Agent 2 (Data): AI (95%) "Five of six metrics flag AI. Burstiness of 0.18 well below human threshold..." 😈 Agent 3 (Critic): AI-AUGMENTED (65%) "Could be human technical writing. Transition density alone not conclusive..." Self-updating fingerprint database A separate workflow branch runs weekly to keep the AI phrase list current: Check existing words: Reads all fingerprint phrases from the data table Find new AI tells: Asks an LLM what phrases modern models currently overuse Filter duplicates: Removes words already in the database Add to table: Stores new phrases for future detection Requires: A data table (Google Sheets, Airtable, or n8n Data Table) to store fingerprint words. The workflow includes a starter list of 100+ phrases like "delve into," "it's worth noting," "as of my last update." LLM writing patterns shift fast. What worked for GPT-3 detection does not work for GPT-4. This keeps the detector current without manual updates. Key benefits Three classifications instead of binary.** Human, AI, or AI-augmented. Most real content is hybrid. You see the reasoning.** Full agent debate included. When verdicts are borderline, you can read which argument won. Transparent metrics.** Raw numbers exposed with red/green flags. No hidden scoring. Self-updating detection.** Weekly workflow finds new AI phrase patterns as models evolve. Error resilient.** If one agent fails, the workflow continues and redistributes weights. Who this is for Content teams verifying contractor submissions are not AI-generated Educators checking student essays for AI assistance Publishers screening submissions to maintain editorial standards SEO teams ensuring content meets Google's helpful content guidelines Researchers analyzing hybrid human-AI writing patterns Setup Add API credentials for at least one LLM provider (Groq, OpenAI, Gemini, or Anthropic) Create a data table for AI fingerprint phrases or use n8n's built-in Data Table node Populate the table with the starter list (included in workflow documentation) Activate the workflow and open the chat interface Paste text and wait 30-60 seconds for forensic analysis Required APIs & credentials At least one LLM provider: OpenAI, Anthropic, Google Gemini, Groq, or any other provider with JSON output support. Each agent can use a different provider or all can use the same one. Data storage for fingerprint phrases: n8n Data Table (built-in), Google Sheets, or Airtable. The workflow checks this table to identify known AI phrases during analysis. How to customise it Swap models:** Each agent node has a chat model sub-node. Replace with any provider. Scanner works with smaller models. Analyst needs strong reasoning. Devil's Advocate needs good instruction-following. Tune thresholds:** Open Extract Stylometric Metrics code. Burstiness under 0.3 flags AI. Type-token ratio under 0.4 flags AI. Adjust for stricter or looser detection. Change agent weights:** Open Final Verdict code. Default is 35% Analyst, 15% Scanner, 15% Devil's Advocate, 35% metrics. Increase metric weight to trust data more. Modify agent personas:** Edit system prompts. Make Scanner more skeptical. Make Analyst cite sources. Make Devil's Advocate more aggressive. Add quality gate:** Drop a Filter node after verdict. Only proceed if confidence exceeds 70%. Batch process:** Replace Chat Trigger with Schedule Trigger looping over a file list. Known limitations The workflow works best on long-form content (500+ words). Short texts under 100 words produce less reliable metrics because statistical patterns need more data to emerge. The recalibration helps but is not perfect. AI fingerprint phrases evolve as models improve. GPT-5 might not use "delve into" but will have new tells. The self-updating workflow helps but lags current releases by a few weeks. The three-agent debate architecture assumes disagreement is meaningful. For extremely niche topics where only one agent has relevant training data, the minority opinion might be correct but gets outvoted. Review the individual agent reasoning when dealing with specialized content.
by Cheng Siong Chin
Introduction Automates stock market analysis using multiple AI models to predict trends, analyze sentiment, and generate consensus-based investment insights. For traders and analysts seeking data-driven forecasts by eliminating manual research and combining AI perspectives for accurate predictions. How It Works Daily trigger fetches stock data, news, ratings, and sentiment → AI models analyze each source → OpenAI generates report → Three AI validators (OpenAI, Anthropic, Gemini) cross-verify → Consensus evaluation → Telegram alert with insights. Workflow Template Schedule → Fetch Stock Data → Fetch News → Fetch Ratings → Fetch Sentiment → AI Analysis → Combine → Generate Report (GPT) → Validate (3 AIs) → Evaluate Consensus → Send Telegram Workflow Steps Data Collection: Scheduled trigger fetches prices, news, analyst ratings, and social trends AI Analysis: Separate models analyze stocks, news sentiment, ratings, and social discussions Report Generation: OpenAI GPT combines analyses into comprehensive market report Multi-AI Validation: Three AI models independently validate predictions for accuracy Consensus Building: Evaluates AI agreement to determine confidence levels Alert Delivery: Sends Telegram alerts with buy/sell/hold recommendations Setup Instructions Schedule: Configure daily trigger time Data Sources: Add API keys for stock data, news APIs, and social platforms AI Models: Configure OpenAI, Anthropic, and Google Gemini credentials Telegram: Create bot and add token Thresholds: Define consensus requirements for recommendations Prerequisites Stock data API (Alpha Vantage, Yahoo Finance) News API key Social media API OpenAI API key Anthropic API key Google Gemini API key Telegram bot token Use Cases Day Trading: Real-time volatile stock analysis with multiple AI perspectives. Portfolio Management: Daily consensus reports for rebalancing. Customization Add technical indicators (RSI, MACD). Include crypto analysis. Integrate portfolio tracking. Add email/Slack notifications. Configure sector-specific analysis. Benefits Eliminates hours of daily research. Reduces AI hallucination through multi-model validation. Provides 24/7 monitoring. Combines multiple data sources.
by Cheng Siong Chin
Introduction Automates overseas conference approval requests to CEO. Generates emails with conference details, flight quotes, accommodation, expense breakdown, and admin procedures. Ensures consistency and saves time. How It Works Manual trigger initiates: fetches exchange rates/conference details, parses flight quotes, uses AI to calculate expenses and generate draft, checks budget, formats messages, merges versions, creates PDF, sends to CEO, logs to tracker. Workflow Template Manual Trigger → Configuration → [Exchange Rates + Conference Details + Flight Quotes] → AI Agent → [GPT-4 + Calculate + Extract + Generate Tools] → Total Expenses → Budget Check → [Format Approved + Warning] → Merge → PDF → Send CEO → Log Tracker Workflow Steps Initialization: Manual trigger with conference parameters, sets variables (name, dates, location, funding) Data Collection: Fetches/parses exchange rates, conference details via HTTP, aggregates 3 flight quotations AI Processing: AI Agent orchestrates GPT-4 with Calculate, Extract, Generate tools for expense analysis and email drafting Validation: Calculates total expenses, validates against budget threshold Formatting: Customizes approval/warning messages by status, merges content versions Delivery: Generates PDF breakdown, dispatches via Gmail to CEO, logs to Google Sheets tracker Setup Instructions APIs: Configure currency/conference endpoints with credentials OpenAI: Add GPT-4 API key in AI Agent AI Tools: Set Calculate, Extract, Generate parameters Gmail: Connect account, set CEO recipient Sheets: Link tracker with write permissions Budget: Set threshold (default: $5000) Prerequisites n8n instance, Currency API, Conference API, OpenAI GPT-4 key, Gmail with OAuth, Google Sheets, PDF generator, Travel agent API Use Cases Academic: Staff requests conference with grant, registration, 3 quotes, hotel, visa. AI generates email with PO/card procedures. Sales: Manager seeks client meeting approval with comparisons, per diem. Training: Employee requests certification with fees, accommodation, transport. Customization Modify thresholds by department. Add categories (insurance, baggage). Customize AI prompts for tone/branding. Integrate flight sources. Extend approval chain. Add travel restrictions. Benefits Time Efficient: Reduces prep from 60+ to 5 minutes. AI-Powered: Intelligent analysis and generation. Consistent: Ensures completeness. Accurate: Eliminates errors.
by Meak
Gmail Lead Reply Analyzer → HubSpot Task + Slack Alert Most sales teams read every email, guess if it’s important, and tell teammates manually. This workflow does it automatically: check intent and sentiment with AI, create follow-up tasks, send Slack alerts, and save everything to Google Sheets. Benefits AI checks sentiment, intent, urgency, and priority Creates HubSpot tasks only if follow-up is needed Sends Slack message with lead summary Logs all results to Google Sheets for tracking Runs 24/7 with no manual sorting How It Works Gmail trigger watches a label for new replies Workflow extracts sender, subject, and message AI analyzes message and returns: sentiment, intent, urgency, next step Code step cleans result, adds date, and checks if follow-up is needed If follow-up = yes → create HubSpot task, send Slack alert, log to Sheets If follow-up = no → just log to Sheets Who Is This For Sales teams getting many leads by email Founders who handle leads themselves Agencies needing clear and fast lead triage Setup Connect Gmail (choose or create label) Add OpenAI API key (model: GPT-4o mini) Connect HubSpot (App Token for tasks) Connect Slack (channel for alerts) Connect Google Sheets (Spreadsheet + Tab) Optional: change how urgency/priority is scored in the code ROI & Monetization Save 3–6 hours per week on email sorting Answer faster and close more deals Sell as $1k–$3k/month “inbox automation” service Strategy Insights In the full walkthrough, I show how to: Make sure AI always returns valid JSON Adjust what counts as a follow-up lead Format Slack messages for quick reading Use Google Sheets as a simple dashboard Check Out My Channel For more AI automation systems that get real results, check out my YouTube channel where I share exactly how I build automation workflows, sell high-value services, and scale to $20k+ monthly revenue.
by Masaki Go
About This Template This workflow automatically generates and sends AI-powered responses to user inquiries from a LINE Official Account. It uses RAG (Retrieval-Augmented Generation) technology to produce natural, context-aware answers based on your FAQ database (Supabase/PostgreSQL). How It Works Receive Questions: An n8n webhook receives messages from your LINE Official Account. FAQ Search: The n8n LangChain Agent analyzes the user’s question and performs a vector search on your Supabase FAQ database. It can also fetch user-specific data (e.g., reservation info) from PostgreSQL. AI Generation: The OpenAI GPT model generates a context-aware answer based on the retrieved information and conversation history. Reply: The response is sent back to the user via the LINE Messaging API. Admin Notifications: (Optional) If the AI cannot answer, the workflow can notify admins (e.g., via LINE WORKS or Slack). Who It’s For Businesses wanting to automate customer support on LINE. Developers building intelligent chatbots with existing FAQ data. Organizations aiming for 24/7 customer service. Requirements An n8n account (cloud or self-hosted) An OpenAI API key A Supabase account (for FAQ data) A PostgreSQL database (for conversation history) A LINE Official Account & Messaging API access token Setup Steps Configure Credentials: Register credentials for OpenAI, Supabase, PostgreSQL, and LINE Messaging API in n8n. Prepare Databases: Create your tables in Supabase (for FAQs) and PostgreSQL (for conversation history). Customize the Prompt: In the "RAG AI Agent" node, edit the system prompt to fit your business and tone. Set Environment Variables: Update URLs, Channel IDs, and API endpoints in the nodes to match your environment. Customization Options Change AI Model:** Select a different model (e.g., gpt-4o) in the "OpenAI Chat Model" node. Add Data Sources:** Add new "Tool" nodes (like an HTTP Request) to the "RAG AI Agent" to access other APIs (e.g., booking systems). Change Notifications:** Replace the "LINE Works" nodes with a Slack or Email node to change the admin notification channel.
by Michael Taleb
How it works Watches a Google Drive folder for new (scanned) invoices. Each new file automatically triggers the workflow. Downloads and processes each invoice through OCR Space to extract the text. Extracts the company name (e.g. from the “billed to” field) and uses an AI agent to cross-reference it against a database in Google Sheets. If a match is found, retrieves the correct recipient email and sends the invoice as an attachment. If no match or an error occurs, the workflow alerts an operator by email for manual review. Setting up the workflow Connect Google Drive • In n8n, connect your Google Drive account. • Create or select a folder where you will upload scanned invoices. Connect Gmail (or another email service) • Add your Gmail account as a credential in n8n. • This will be used to send the processed invoice to the correct recipient. Set up OCR.Space • Create a free OCR.Space account: https://ocr.space • In n8n, create a Generic Credential (Header Auth). • Use apikey as the name and your OCR API key as the value. Connect the AI Agent • Add your OpenAI API key as a credential in n8n. • The AI Agent will extract the company name from the invoice text and match it against your database. • If a match is found, it retrieves the correct email. Prepare the Google Sheet database • Make a copy of the database sheet: Google Sheet Template • Fill it with company names and recipient emails. • Connect your Google account to n8n and link this sheet to the workflow. Run the workflow • When a new invoice is uploaded to your Google Drive folder, the workflow will: • Extract the text with OCR.Space • Use the AI Agent to identify the company name • Cross-reference it with your Google Sheet database • Send the invoice automatically to the correct recipient via Gmail • If no match is found, an error email is sent to you for manual review
by Cheng Siong Chin
Introduction Automates travel planning by aggregating flights, hotels, activities, and weather via APIs, then uses AI to generate professional itineraries delivered through Gmail and Slack. How It Works Webhook receives requests, searches APIs (Skyscanner, Booking.com, Kiwi, Viator, weather), merges data, AI builds itineraries, scores options, generates HTML emails, delivers via Gmail/Slack. Workflow Template Webhook → Extract → Parallel Searches (Flights/Hotels/Activities/Weather) → Merge → Build Itinerary → AI Processing → Score → Generate HTML → Gmail → Slack → Response Workflow Steps Trigger & Extract: Receives destination, dates, preferences, extracts parameters. Data Gathering: Parallel APIs fetch flights, hotels, activities, weather, merges responses. AI Processing: Analyzes data, creates itinerary, ranks recommendations. Delivery: Generates HTML email, sends via Gmail/Slack, confirms completion. Setup Instructions API Configuration: Add keys for Skyscanner, Booking.com, Kiwi, Viator, OpenWeatherMap, OpenRouter. Communication: Connect Gmail OAuth2, Slack webhook. Customization: Adjust endpoints, AI prompts, HTML template, scoring criteria. Prerequisites API keys: Skyscanner, Booking.com, Kiwi, Viator, OpenWeatherMap, OpenRouter Gmail account Slack workspace n8n instance Use Cases Corporate travel planning Vacation itinerary generation Group trip coordination Customization Add sources (Airbnb, TripAdvisor) Filter by budget preferences Add PDF generation Customize Slack format Benefits Saves 3-5 hours per trip Real-time pricing aggregation AI-powered personalization Automated multi-channel delivery
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 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 Msaid Mohamed el hadi
🤖 Instagram Automation Suite: AI Chatbot & Content Powerhouse Workflow Overview This cutting-edge n8n workflow is a comprehensive automation solution designed to streamline various Instagram operations. It combines an intelligent AI chatbot for direct message management, automated user following, and an advanced content generation system, all integrated to enhance your Instagram presence and efficiency. This workflow automatically: Manages Instagram Direct Messages via Telegram Chatbot: Listens for new messages on Telegram. Routes messages from a specific Instagram user (Wolf23000) for processing. Utilizes an AI agent (powered by OpenRouter's cutting-edge models) to determine the intent of the message (e.g., chat back, run an Instagram-related action like getting profile info, posting, or following). Sends AI-generated responses back to the user via Telegram. Automates Instagram User Following: Scheduled to run at regular intervals (hourly). Processes a list of usernames (likely from a Google Sheet, though not explicitly shown in the provided JSON, it's a common pattern for "Auto Follow users from sheet" sticky note). Initiates following actions on Instagram for the specified users. Generates & Schedules Instagram Posts: Scheduled to run monthly. Leverages an AI agent (powered by OpenRouter) to generate 30 or 31 Instagram post ideas for the current month, based on a predefined "Instagram personality profile." Each post idea includes an imagePrompt (for AI image generation), a caption with emojis and hashtags, and a scheduledDate. Refines these post ideas by enhancing the imagePrompt to be more vivid and detailed for AI image generation, and polishing the caption for optimal engagement. Updates a Google Sheet ("posts generation plan") with the generated content, including the enhanced image prompts and the resulting image URLs (presumably from a separate image generation step not fully detailed in the provided JSON, but implied by image_url updates). Key Benefits Intelligent DM Management: Automate responses and actions for Instagram direct messages, ensuring timely and relevant interactions without manual effort. Effortless Audience Growth: Automatically follow target users, expanding your reach and potential engagement on Instagram. AI-Powered Content Creation: Generate a full month's worth of diverse, engaging Instagram post ideas tailored to a specific personality, complete with image prompts and captions. Content Optimization: Automatically enhance image prompts for better AI image generation and refine captions for maximum impact. Time-Saving: Significantly reduce the manual workload associated with Instagram management, from direct messages to content planning and execution. Consistent Brand Voice: Maintain a consistent and engaging presence on Instagram with AI-generated content aligned with your defined personality. Setup Requirements To set up and run this workflow, you'll need the following: n8n Installation: Install n8n (cloud or self-hosted). The latest stable version, as of July 2025, is v1.101.1. Import the workflow configuration. Configure API credentials for all integrated services. Set up scheduling preferences for continuous operation. System Requirements for Self-Hosting: A modern multi-core processor (2 cores minimum, 4 recommended), 2 GB RAM (4 GB or more recommended), and 20 GB of free SSD storage. Node.js version 16 or later (18.x LTS recommended) is required. PostgreSQL is the recommended database for production. Telegram API Access: Create a Telegram bot via BotFather and obtain your API token. Configure the Telegram Trigger node with your bot's API credentials to receive messages. Pricing: Telegram's API is free to use. OpenRouter API Access: Create an OpenRouter account and generate an API key. This key ({{your open router api key }} as seen in the code) is used to access their chat models (e.g., google/gemini-2.5-flash-preview) for AI agent operations. Pricing: OpenRouter offers a variety of models with different pricing structures, including some free models like DeepSeek R1. Most models operate on a pay-per-usage basis, with costs clearly displayed for each model and prompt. Instagram Session ID: You'll need a valid Instagram session ID ({{ your instagram session ID }} as seen in the code) for the workflow to interact with Instagram. This usually involves extracting it from your browser's cookies after logging into Instagram. Caution: Instagram's terms of service generally prohibit automated interactions, and using session IDs for scraping or automation can lead to account suspension. Use with extreme caution and at your own risk. Apify token setup: *You'll need to replace {{ your apify token }} with you apify token in https requests Google Sheets Credentials: A Google Cloud API key with access to Google Sheets. Set up OAuth2 authentication in n8n for read/write access to your "posts generation plan" spreadsheet (Document ID: 1XHNwAXR4USThaAzX1Y6M5PF2P8WqCBU8mi34FBLkV6M). This sheet is used to store and manage generated post ideas. Pricing: The Google Sheets API is generally free for most common use cases, with generous per-minute quotas (300 read and 300 write requests per minute per project, 60 per user per project). No additional charges are incurred for exceeding these limits. https://docs.google.com/spreadsheets/d/1Ze5SC1g6Q5VzMAKYx0zmqlT00Db1HOchUth1jrPyM2Y/edit?usp=sharing https://docs.google.com/spreadsheets/d/1XHNwAXR4USThaAzX1Y6M5PF2P8WqCBU8mi34FBLkV6M/edit?usp=sharing Predefined Instagram Personality JSON: The workflow relies on a detailed JSON object defining an "Instagram personality" (e.g., user_id, username, full_name, bio, content_preferences, personality_traits, unfulancer_attributes). This JSON needs to be correctly set within the Code nodes (Variables, Variables1, Variables2) to guide the AI content generation. Workflow Architecture [Telegram New Message Trigger] ⬇️ [Variables (Set OpenRouter API Key, Instagram Personality, Session ID)] ⬇️ [Switch (Filter messages from 'Wolf23000' and ensure message text exists)] ⬇️ [Edit Fields (Extract message text)] ⬇️ [AI Agent (Determine action based on message intent)] ⬇️ [Structured Output Parser (Parse AI agent's JSON output)] ⬇️ [Switch1 (Route based on AI agent's determined action: chat_back, run_agent, get_instagram_profile)] ⬇️ ┌─────────────┬─────────────┬─────────────┐ │ │ │ │ ▼ ▼ ▼ ▼ [Send a text message1 (Chat back)] [Send a text message (Run agent confirmation)] [Send a text message2 (Get profile confirmation)] ▲ │ [Schedule Trigger (Hourly for Instagram follow)] ⬇️ [Variables (Set OpenRouter API Key, Instagram Personality, Session ID)] ⬇️ [Code (Prepare usernames for following)] ⬇️ [Code1 (Process followed usernames)] ⬇️ [Schedule Trigger2 (Monthly for Instagram post generation)] ⬇️ [AI Agent1 (Generate monthly Instagram post ideas)] ⬇️ [OpenRouter Chat Model (AI Model for content generation)] ⬇️ [Code2 (Parse AI agent's JSON output)] ⬇️ [Schedule Trigger3 (Daily for post generation refinement and auto-posting)] ⬇️ [AI Agent2 (Enhance image prompts and captions)] ⬇️ [OpenRouter Chat Model2 (AI Model for prompt refinement)] ⬇️ [Update row in sheet1 (Update Google Sheet with enhanced content)] ⬇️ [Get row(s) in sheet2 (Retrieve data from Google Sheet)] Connect With Me Exploring AI-Powered Social Media Automation? 📧 Email: mohamedgb00714@gmail.com 💼 LinkedIn: Mohamed el Hadi Msaid Supercharge your Instagram presence with intelligent automation and AI-driven content\! 🚀
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 Hemanth Arety
Automatically fetch, curate, and distribute Reddit content digests using AI-powered filtering. This workflow monitors multiple subreddits, ranks posts by relevance, removes spam and duplicates, then delivers beautifully formatted digests to Telegram, Discord, or Slack. Who's it for Perfect for content creators tracking trends, marketers monitoring discussions, researchers following specific topics, and community managers staying informed. Anyone who wants high-quality Reddit updates without manually browsing multiple subreddits. How it works The workflow fetches top posts from your chosen subreddits using Reddit's JSON API (no authentication required). Posts are cleaned, deduplicated, and filtered by upvote threshold and custom keywords. An AI model (Google Gemini, OpenAI, or Claude) then ranks remaining posts by relevance, filters out low-quality content, and generates a formatted digest. The final output is delivered to your preferred messaging platform on a schedule or on-demand. Setup requirements n8n version 1.0+ AI provider API key (Google Gemini recommended - has free tier) At least one messaging platform configured: Telegram bot token + chat ID Discord webhook URL Slack OAuth token + channel access How to set up Open the Configuration node and edit subreddit list, post counts, and keywords Configure the Schedule Trigger or use manual execution Add your AI provider credentials in the AI Content Curator node Enable and configure your preferred delivery platform (Telegram/Discord/Slack) Test with manual execution, then activate the workflow Customization options Subreddits**: Add unlimited subreddits to monitor (comma-separated) Time filters**: Choose from hour, day, week, month, year, or all-time top posts Keywords**: Set focus keywords to prioritize and exclude keywords to filter out Post count**: Adjust how many posts to fetch vs. how many appear in final digest AI prompt**: Customize ranking criteria and output format in the AI node Schedule**: Use cron expressions for hourly, daily, or weekly digests Output format**: Modify the formatting code to match your brand style Add email notifications, database storage, or RSS feed generation by extending the workflow with additional nodes.