by oka hironobu
Automate Business Card Management with LINE, AI, and Google Sheets Who's it for This workflow is designed for business professionals and sales teams who receive business card images via LINE and want to quickly digitize contact information with minimal manual work. It is best suited for users who process business cards one image at a time and want a simple, reliable automation rather than a high-volume ingestion pipeline. What it does This workflow processes a single business card image sent via LINE, extracts text using Google Gemini AI, and stores the structured contact information in Google Sheets. The workflow focuses on simplicity and clarity: it receives an image, performs AI-based OCR, parses the extracted text, saves the result, uploads the original image for reference, sends a thank-you email, and replies with the extracted data on LINE. How it works A single business card image is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for OCR. The extracted text is parsed into structured fields. The data is appended to Google Sheets. The image is uploaded to Google Drive. A thank-you email is sent via Gmail. The extracted information is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Gmail account for sending thank-you emails A Google Sheets document with the following column names: Company Name Contact Name Department Address Email Address Phone Number Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. OCR accuracy depends on image quality, lighting, and card design. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, and Google Drive folder ID. Configure credentials for LINE, Google Gemini, Google Sheets, Google Drive, and Gmail. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single business card image. How to customize Modify the AI prompt in the “Extract Card Info” node to support different languages or fields. Adjust the parsing logic to match different business card layouts. Replace Google Sheets with a CRM or database. Add queueing or locking logic if you want to support batch or sequential image uploads. Note: This workflow was tested using real business card images sent individually via the LINE Messaging API. For production use, testing with your own card samples is strongly recommended.
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 Tricore Infotech Pvt Ltd
🛍️ Shopify Daily Order Reporting: AI Summaries & Multichannel Alerts Summary E-commerce store management made easy. The workflow pulls your daily Shopify orders, calculates essential metrics like revenue and fulfillment rates, and categorizes them by status (shipped, returned, cancelled, or pending). Gemini AI then transforms this data into a polished daily summary, logs the metrics into Google Sheets, and delivers the final report directly to your team via Slack and email. Perfect for store owners and managers who want a hands-off, easy-to-read daily brief on how the store performed. Key Features Automated Math:** Instantly calculates total orders, revenue, average order value, and categorizes whether orders are paid, shipped, returned, cancelled, or pending. AI-Powered Summaries:** Our AI (Gemini) reads your order data and writes a clean daily summary that looks good in Slack and email. Multichannel Updates:** Delivers the final summary directly to your inbox via Gmail and your team's Slack channel simultaneously. Centralized Logging:** Every daily summary is appended to a Google Sheet for easy long-term tracking. Safety Net Alerts:** If any step fails (like a Shopify API timeout or a full Google Sheet), an error message appears in the dedicated Slack channel you select. 🧩 Nodes Used Schedule Trigger:** Initiates the workflow daily at the specified time. Set:** Defines global configuration variables like the recipient email and sheet URL. Shopify:** Fetches the daily updated orders from your store. Code:** Custom JavaScript to calculate metrics and categorize orders safely. If:** Routes the workflow logic based on whether new orders were found. Google Sheets:** Appends the parsed daily metrics to your tracking sheet. Advanced AI (Gemini Model & Chain):** Generates the formatted summary text. Gmail:** Sends the HTML formatted daily report via email. Slack:** Delivers reports, zero-order notices, and error alerts to specified channels. Error Trigger:** Catches workflow failures for global error handling. How It Works Trigger: Runs automatically every day at 23:59 (in your local timezone). Ingestion: Connects to Shopify's order system and pulls all orders from the current day. Processing: Sorts the raw data into actionable categories (shipped, refunded, cancelled, pending). AI Generation: Gemini translates the numbers into a readable daily report. If there are no orders for the day, Slack gets a quick "no updates" ping, and the email is NOT sent. Distribution: Logs the data to Google Sheets, emails the summary via Gmail, and posts it to Slack. 🛠️ Setup Instructions Step 1: Authenticate All Credentials Before building, connect your accounts by clicking each node and selecting "Connect": Shopify API:** Requires your store admin URL and an API token. Google Sheets & Gmail:** Sign in with your Google account. Slack API:** Authorize the n8n bot to post in your workspace. Google Gemini API:** Enter the API key from your Google Cloud account. Step 2: Configure Workflow Variables Open the "Set Config (Email & Sheet URL)" node and fill in the basics: recipientMail:** The email address where daily reports will be sent (e.g., manager@company.com). googleSheetUrl:** Leave this blank for now or type pending — we'll update it in Step 4. Step 3: Create Your Google Sheet Create a blank Google Sheet. In Row 1, add these exact headers (they are case-sensitive): Date | Total Orders | New Orders | Shipped | Refunded | Cancelled | Revenue | Avg Value | Fulfillment % | Timestamp Step 4: Paste the Sheet URL Copy your new Google Sheet's URL (format: https://docs.google.com/spreadsheets/d/{SHEET_ID}/edit). Go back to the "Set Config (Email & Sheet URL)" node and paste this URL into the googleSheetUrl field. Open the "Log to Google Sheets" node and ensure it is pointing to this document. Step 5: Select Slack Channels Open the "Slack - Send Report" node and select the channel for daily reports. Open the "Slack - No Orders Alert" node and select a channel (can be the same one). Open the "Slack - Send Error Alert" node (bottom left) and select a channel for emergency alerts (like a dedicated #errors channel). Step 6: Set Workflow Timezone (Crucial!) Where to find it:** Top menu → Workflow Settings (gear icon) → Timezone dropdown. What it does:** Changes when the workflow runs AND which day's orders it pulls. Example:** Set to Asia/Kolkata? It runs at 23:59 IST and pulls orders from midnight-to-midnight IST. Step 7: Activate Toggle the workflow to Active in the top right corner. It will now run on autopilot! ✅ Verification Checklist Before trusting it completely, double-check these items: [ ] Shopify API has orders:read permissions enabled. [ ] Gmail OAuth2 credential has been created and connected. [ ] Slack bot has chat:write permissions. [ ] Google Sheets OAuth has been granted (workflow can access your sheets). [ ] Google Gemini API is enabled in your Google Cloud project. [ ] Shopify store timezone set correctly in Workflow Settings. [ ] First manual test run completed successfully (click "Test Workflow"). ⚠️ Limitations Order Volume Limit:** The Shopify fetch node is currently set to a limit of 1000 orders. If your store updates more than 1000 orders in a single day, the node will cap at 1000. For massive scale, this node would need to be replaced with an HTTP Request node utilizing cursor-based pagination. Timezone Dependency:** Ensure your n8n workflow timezone perfectly matches your Shopify store timezone to prevent orders from being miscategorized between days. 💡 How to Customize Want only PAID orders (skip pending)?** Edit the Calculate & Categorize Metrics code node. Change the filtering logic to only include orders where financial_status = "paid". Want to change the AI's tone?** Open the Generate AI Summary node. You can explicitly tell Gemini to "write this like a strict financial auditor" or "make it fun and enthusiastic with lots of emojis." Need reports sent to the whole team?** Duplicate the Gmail node to send to additional email addresses, or change the recipientMail variable to a group distribution list.
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 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 Sona Labs
Sona-Powered AI Sales Research & Personalized Email Automation 🎯 Overview Automatically research B2B leads and generate personalized outreach emails by reading prospects from Google Sheets, enriching with company data from Sona Enrich, analyzing insights with AI, and creating custom emails — so you can scale personalized outreach to target accounts. You'll be able to automatically enrich company data for target accounts, use AI to identify pain points and opportunities, generate personalized email copy, and sync everything back to your sheet with ready-to-send Gmail compose links. ✨ What This Workflow Does Smart Lead Processing - Reads leads from Google Sheets and filters unprocessed contacts Deep Company Intelligence - Enriches each lead using Sona's API (industry, tech stack, revenue, employee count, social profiles) AI-Powered Research - GPT-4 analyzes company data to identify pain points, growth opportunities, and personalization hooks Email Generation - Creates 120-150 word personalized emails with curiosity-driven subject lines Automated Sync - Updates Google Sheets with research insights and one-click Gmail compose links 🔥 Key Features Structured AI Output** - Consistent, high-quality research and copy generation Zero Manual Work** - Processes 20-50 leads per hour completely hands-free Email Generation - Creates 120-150 word personalized emails with curiosity-driven subject lines Gmail Integration** - Pre-filled send links for instant outreach Progress Tracking** - Real-time status updates in Google Sheets 💼 Perfect For Sales teams doing cold outreach SDRs needing personalized emails at scale Agencies managing client prospecting Founders building their pipeline 📋 What You'll Need 1. Sona API Key Get yours at sonalabs.com Provides company data enrichment Add to HTTP Request node header: x-api-key: YOUR_KEY 2. OpenAI API Key Get from platform.openai.com Uses GPT-4.1-mini for research and email generation Add credentials in n8n 3. Google Sheets Setup Create a spreadsheet with these columns: Input columns:** Website Domain, Company Name, Contact Name, Email, Industry Status column:** Research Status (leave empty for new leads) Auto-populated:** Pain Points, Key Insight, Email Subject, Email Body, Send Email Link, Generated Date, Sent Status 4. Google Sheets API Enable in Google Cloud Console Set up OAuth2 with spreadsheets permission Add your spreadsheet ID to workflow nodes 🚀 Setup Instructions Import workflow into n8n Add credentials: Sona API key (HTTP Request node) OpenAI API credentials Google Sheets OAuth2 Update spreadsheet ID in all Google Sheets nodes Customize AI prompts (optional) to match your offering Test with 2-3 leads before running full list Execute workflow - it processes leads automatically in batches 📊 Expected Output Each processed lead gets: Pain points** (3-5 identified challenges) Growth opportunities** (2-3 actionable insights) Personalization hooks** (3-4 talking points) Email subject line** (max 8 words, curiosity-driven) Email body** (120-150 words, consultative tone) Gmail compose link** (one-click to send) Fit score** (High/Medium/Low) Processing time: 30-60 seconds per lead 🎓 How It Works Step 1: Data Input & Filtering Reads all leads from Google Sheets and filters out already-processed leads (those with a value in "Research Status" column). Step 2: Company Data Enrichment Updates status to "Pending" in Google Sheets Searches Sona database using domain or email 5-tier smart matching algorithm finds best company match Retrieves firmographic data and technology stack Step 3: AI Company Research GPT-4.1-mini analyzes company data to generate: Specific pain points based on industry, size, tech stack Growth opportunities and market positioning Personalization hooks from company description Recommended outreach tone and CTA One-liner insight for email opening Step 4: Personalized Email Generation AI crafts cold email following best practices: Curiosity-driven subject line (max 8 words) Opens with personalization hook showing research References ONE specific pain point Focuses on tangible outcomes (not product features) Natural CTA without being pushy Professional but conversational tone Step 5: Data Output & Loop Formats all data for Google Sheets Creates Gmail compose link with pre-filled content Updates sheet with complete results Sets status to "Completed" Waits 2 seconds, then processes next lead ⚡ Pro Tips Start small:** Test with 5-10 leads to validate personalization quality Review first emails:** Adjust AI prompts if tone needs calibration Clean your data:** Better input domains = better Sona matches Monitor fit scores:** Focus manual review on High/Medium fits Use status column:** Easily re-run workflow for new leads only Connect CRM:** Use webhooks to push data to Salesforce/HubSpot 🎯 Use Cases Sales Team Automation Process 100+ leads overnight with personalized research and emails ready by morning. Agency Client Work Deliver custom prospecting campaigns with unique emails for each client's target accounts. Founder Outreach Build pipeline systematically with AI-researched, personalized emails at scale. SDR Productivity Give SDRs pre-researched talking points and draft emails to speed up their workflow 10x. 📈 Expected Results Email personalization:** 10x better than templates Time saved:** 5-10 minutes per lead → 30 seconds automated Response rates:** 2-3x higher with AI-researched insights Scalability:** Process 50-100 leads per day hands-free 🔧 Customization Options Change AI model:** Swap GPT-4.1-mini for GPT-4 or other models Adjust email length:** Modify prompt to generate shorter/longer emails Add more enrichment:** Chain additional API calls (Clearbit, Apollo, etc.) Multi-language:** Update prompts for outreach in other languages Custom tone:** Adjust system prompts for industry-specific voice Webhook triggers:** Replace manual trigger with scheduled runs or form submissions 🐛 Troubleshooting No Sona data found? Verify API key is correct Check domain format (remove http://, trailing slashes) Fallback uses first search result if no exact match AI output not formatted correctly? Structured Output Parser ensures valid JSON Check OpenAI API key and model availability Google Sheets not updating? Verify OAuth2 credentials are connected Check spreadsheet ID matches your sheet Ensure column names match exactly (case-sensitive) Rate limits? Sona: 3 second delay between requests (built-in) OpenAI: Adjust batch size or add longer waits Google Sheets: No limit for standard usage 📝 Template Information Category:** Sales & Marketing Difficulty:** Intermediate Setup Time:** 5-10 minutes Run Time:** 30-60 seconds per lead Cost:** Pay-per-use (Sona API + OpenAI tokens) Updated:** December 2025