by Manav Desai
WhatsApp RAG Chatbot with Supabase, Gemini 2.5 Flash, and OpenAI Embeddings This n8n template demonstrates how to build a WhatsApp-based AI chatbot that answers user questions using document retrieval (RAG) powered by Supabase for storage, OpenAI embeddings for semantic search, and Gemini 2.5 Flash LLM for generating high-quality responses. Use cases are many: Turn your WhatsApp into a knowledge assistant for FAQs, customer support, or internal company documents — all without coding. Good to know The workflow uses OpenAI embeddings for both document embeddings and query embeddings, ensuring accurate semantic search. Gemini 2.5 Flash LLM** is used to generate user-friendly answers from the retrieved context. Messages are processed in real-time and sent back directly to WhatsApp. Workflow is modular — you can split document ingestion and query handling for large-scale setups. Supabase and WhatsApp API credentials must be configured before running. How it works Trigger: A new WhatsApp message triggers the workflow via webhook. Message Check: Determines if the message is a query or a document upload. Document Handling: Fetch file URL from WhatsApp. Convert binary to text. Generate embeddings with OpenAI and store them in Supabase. Query Handling: Generate query embeddings with OpenAI. Retrieve relevant context from Supabase. Pass context to Gemini 2.5 Flash LLM to compose a response. Response: Send the answer back to the user on WhatsApp. Optional: Add Gmail node to forward chat logs or daily summaries. How to use Configure WhatsApp Business API webhook for incoming messages. Add your Supabase and OpenAI credentials in n8n’s credentials manager. Upload documents via WhatsApp to populate the Supabase vector store. Ask queries — the bot retrieves context and answers using Gemini 2.5 Flash. Requirements WhatsApp Business API** (or Twilio WhatsApp Sandbox) Supabase account** (vector storage for embeddings) OpenAI API key** (for generating embeddings) Gemini API access** (for LLM responses) Customising this workflow Swap WhatsApp with Telegram, Slack, or email for different chat channels. Extend ingestion to other sources like Google Drive or Notion. Adjust the number of retrieved documents or prompt style in Gemini for tone control. Add a Gmail output node to send logs or alerts automatically.
by RedOne
Smart Customer Support AI Agent with Gmail and Telegram Who is this for? This workflow is perfect for: Small to medium businesses** looking to automate customer support E-commerce stores** handling order inquiries and customer questions SaaS companies** providing technical support to users Service providers** managing appointment bookings and general inquiries Startups** wanting to provide 24/7 customer service without hiring full-time staff Agencies** managing client communications across multiple channels What problem is this workflow solving? Customer support is essential but resource-intensive. Common challenges include: Slow response times** leading to frustrated customers Repetitive questions** consuming valuable staff time Inconsistent responses** across different support agents Limited availability** outside business hours Scaling support costs** as business grows Context loss** when customers switch between channels This workflow eliminates these pain points by providing instant, consistent, and intelligent responses 24/7. What this workflow does Core Functionality Multi-Channel Monitoring: Simultaneously watches Gmail and Telegram for customer inquiries Intelligent Processing: Uses AI to understand customer intent and context Knowledge Base Integration: Accesses your company's FAQ and support information Contextual Responses: Provides personalized, helpful replies maintaining conversation history Smart Escalation: Automatically escalates complex issues to human agents Comprehensive Logging: Tracks all interactions for analytics and improvement AI Agent Capabilities Natural Language Understanding**: Comprehends customer questions in plain English Context Awareness**: Remembers previous conversations with each customer Knowledge Retrieval**: Searches your knowledge base for accurate information Response Generation**: Creates professional, brand-appropriate responses Escalation Decision**: Identifies when human intervention is needed Multi-Channel Support**: Handles Gmail and Telegram with channel-specific formatting Automation Features Auto-Response**: Replies to customers within seconds Email Management**: Marks processed emails as read Conversation Threading**: Maintains context in email threads and Telegram chats Error Handling**: Gracefully handles failures with admin notifications Analytics Tracking**: Logs interactions for performance monitoring Setup Prerequisites Active Google Workspace or Gmail account Telegram account for bot creation OpenAI API access Google Sheets access n8n instance (cloud or self-hosted) Step 1: Credential Setup Gmail OAuth2 Configuration Go to Google Cloud Console Create new project or select existing one Enable Gmail API Create OAuth 2.0 credentials Add authorized redirect URIs for n8n In n8n: Settings → Credentials → Add Gmail OAuth2 Enter Client ID and Client Secret Complete OAuth flow Telegram Bot Setup Message @BotFather on Telegram Create new bot with /newbot command Choose bot name and username Copy the bot token In n8n: Settings → Credentials → Add Telegram Enter bot token Set webhook URL in bot settings OpenAI API Configuration Sign up at OpenAI Platform Generate API key in API Keys section In n8n: Settings → Credentials → Add OpenAI Enter API key Choose appropriate model (gpt-4o-mini recommended) Google Sheets Setup Use existing Google account from Gmail setup In n8n: Settings → Credentials → Add Google Sheets OAuth2 Complete authorization flow Step 2: Google Sheets Preparation Create three Google Sheets in your Google Drive: Knowledge Base Sheet Sheet Name**: "Knowledge Base" Columns**: ID, Category, Question/Topic, Answer/Response, Keywords, Last_Updated Import sample data from the Knowledge Base example Customize with your company's FAQs and policies Escalation Tracker Sheet Sheet Name**: "Escalations" Columns**: Timestamp, Customer_Name, Customer_Contact, Inquiry_Summary, Escalation_Reason, Priority, Status, Assigned_To This will be auto-populated by the AI agent Interaction Log Sheet Sheet Name**: "Interaction Log" Columns**: Timestamp, Channel, Customer_Name, Customer_Contact, Inquiry_Subject, Customer_Message, AI_Response, Response_Time, Status This tracks all customer interactions for analytics Step 3: Workflow Configuration Import Template Copy the workflow JSON from the template In n8n: Import workflow from JSON Replace placeholder Sheet IDs with your actual Google Sheet IDs Update Sheet References Open each Google Sheets node Select your created sheets from the dropdown Verify column mappings match your sheet structure Customize AI Prompts Edit the "Customer Support AI Agent" node Update system message with: Your company name and description Brand voice and tone guidelines Specific policies and procedures Escalation criteria Configure Error Notifications (Optional) Set up Slack webhook or email notifications Update error notification node with your webhook URL Customize error message format Step 4: Testing Test Gmail Integration Send test email to your support Gmail account Check workflow execution in n8n Verify response is sent and email marked as read Check interaction logging in Google Sheets Test Telegram Integration Send message to your Telegram bot Verify bot responds appropriately Test conversation memory with follow-up messages Check escalation functionality with complex request Test Knowledge Base Ask questions covered in your knowledge base Verify AI retrieves and uses correct information Test with variations of the same question Ensure responses are consistent and helpful How to customize this workflow to your needs Brand Voice Customization Update the AI system prompt to include: Your company's tone (formal, casual, friendly) Key phrases and terminology you use Brand personality traits Communication style preferences Knowledge Base Expansion Add industry-specific FAQs Include product documentation Add troubleshooting guides Create category-specific responses Escalation Rules Customize when to escalate by modifying the AI agent instructions: Billing disputes over $X amount Technical issues requiring developer help Angry or dissatisfied customers Requests outside standard services Legal or compliance questions Additional Channels Extend the workflow to support: Slack**: Add Slack triggers and response nodes WhatsApp**: Integrate WhatsApp Business API Web Chat**: Add webhook triggers for website chat Discord**: Connect Discord bot integration Analytics Enhancement Add sentiment analysis to customer messages Implement customer satisfaction scoring Create automated reporting dashboards Set up alert thresholds for escalation rates Integration Opportunities CRM Integration**: Connect to HubSpot, Salesforce, or Pipedrive Ticketing System**: Link to Zendesk, Freshdesk, or Jira Service Desk E-commerce Platform**: Integrate with Shopify, WooCommerce, or Magento Calendar Booking**: Connect to Calendly or Acuity for appointment scheduling Advanced Features Multi-language Support**: Add translation capabilities Voice Messages**: Integrate speech-to-text for Telegram voice notes Image Recognition**: Process customer screenshots for technical support Proactive Outreach**: Send follow-up messages based on customer behavior Workflow Maintenance Daily Tasks Review escalation queue Monitor error notifications Check response quality in interaction log Weekly Reviews Analyze customer interaction patterns Update knowledge base with new common questions Review escalation reasons and optimize AI prompts Monthly Optimization Export interaction data for detailed analysis Calculate key metrics (response time, resolution rate, escalation rate) Update AI model parameters based on performance Expand knowledge base with seasonal or trending topics Key Metrics to Track Response Time**: Average time from customer message to AI response Resolution Rate**: Percentage of inquiries resolved without escalation Customer Satisfaction**: Based on follow-up surveys or sentiment analysis Escalation Rate**: Percentage of conversations requiring human intervention Channel Performance**: Effectiveness of Gmail vs Telegram vs other channels Knowledge Base Usage**: Which topics are accessed most frequently Peak Hours**: When customers contact support most often Troubleshooting Common Issues Gmail not triggering**: Check OAuth permissions and API quotas Telegram bot not responding**: Verify bot token and webhook configuration AI responses seem off**: Review and update system prompts Escalations not logging**: Check Google Sheets permissions and column mapping High escalation rate**: Expand knowledge base and refine AI instructions Performance Optimization Monitor OpenAI API usage and costs Adjust AI model temperature for response consistency Optimize knowledge base for faster searches Set appropriate conversation memory limits This workflow provides a solid foundation for automated customer support that can be extensively customized to match your specific business needs and grow with your company.
by Robert Breen
This n8n workflow reads emails from your Outlook inbox, drafts AI-powered replies using OpenAI, and routes them through the gotoHuman node for human approval before replying automatically. ✅ Key Features Reads Outlook emails** from today only (excluding those from your own address). AI-generated replies** crafted using OpenAI based on the subject and body of the email. Community node integration**: Uses the gotoHuman node for human review and approval of replies before sending. Safe sending**: Only approved responses are automatically sent back via Outlook. Expandable**: Can be easily modified to: Send drafts instead of full replies Include additional email filters Trigger at intervals or via webhook 🧠 Nodes Used Microsoft Outlook – Fetch and reply to emails OpenAI – Generates smart reply text gotoHuman – Human-in-the-loop approval system Loop Over Items, IF, Code, and Set nodes for processing logic Manual Trigger – For testing 🔧 Setup Instructions 1. Connect APIs Outlook OAuth2**: Go to Azure Portal Register an app Add Mail.Read, Mail.Send scopes Set redirect URI: https://api.n8n.cloud/oauth2-credential/callback Paste credentials in n8n credential manager OpenAI API**: Create account at OpenAI Create an API Key Add it to n8n credentials gotoHuman API**: Go to https://gotoHuman.ai and sign in Create a review template (e.g., “Email Responses”) Copy the Template ID and API key into n8n credentials 🪜 Workflow Steps Overview 1. Trigger Use the Manual Trigger to test or schedule execution with a cron node. 2. Filter Emails from Today A Code node outputs today's date in the proper yyyy-mm-dd format. const today = new Date(); today.setHours(0, 0, 0, 0); return [{ json: { searchQuery: received:${today.toISOString().split('T')[0]} } }]; 3. Search and Filter Outlook Messages Uses the Outlook node with a search query like: received:2025-08-06 -from:rbreen@ynteractive.com (Update to your email) 4. Generate AI Response Text prompt to OpenAI: subject: {{ $json.subject }} body: {{ $json.body.content }} System prompt: > You are a personal assistant helping respond to emails. I am an AI automation expert specializing in helping small and medium-size businesses automate processes. Create a short response to the email. Sign the email as Robert Breen. 5. Review with gotoHuman Submit AI output for human approval using the gotoHuman node. The output schema should match the Review Template fields (e.g., "email", "OriginalEmail"). 6. IF Node Decision If status is approved, send reply If not, return to loop for revision or skip ✏️ Customization Ideas ✉️ Send only drafts by skipping the "reply" step and storing results. 🕒 Schedule the workflow with a Cron trigger for automation. 🔎 Add label filters or subject keywords for advanced targeting. 🔗 External Links gotoHuman Community Node OpenAI Microsoft Outlook API Setup 💬 Need More Help? If you'd like help customizing this or building similar automations, reach out: Robert Breen AI & Automation Consultant 🌐 https://ynteractive.com 📧 robert.j.breen@gmail.com 🔗 LinkedIn
by TreyDong
How it works • Automatically detects when new pages are created in your Notion workspace • Uses AI to generate contextually relevant icons based on page titles for perfect visual representation • Fetches random high-quality cover images from Unsplash to add visual appeal to each page • Seamlessly integrates with your existing Notion workflow without manual intervention Set up steps • Connect your Notion workspace using API credentials - takes about 5 minutes to configure • Set up AI service integration for intelligent icon generation based on page titles • Configure Unsplash API access for random cover image fetching • Configure webhook triggers to monitor new page creation events • Test the workflow with a sample page to ensure proper functionality • Keep detailed setup instructions and troubleshooting tips in the workflow notes for future reference This template helps streamline your Notion workspace by automatically beautifying new pages with AI-generated icons and stunning Unsplash covers, saving you time while maintaining a visually appealing and professional appearance across your knowledge base.
by Rully Saputra
Daily Sales Metrics Auto-Insight with Gemini, Google Sheets, Calendar, Telegram, Trello and Gmail Who’s it for This workflow is ideal for sales managers, operations teams, and business owners who need daily automated sales summaries and team notifications. It eliminates the hassle of manually gathering, analyzing, and reporting daily sales data, providing instant insights and proactive notifications to keep your team aligned. How it works / What it does This advanced workflow automates the entire daily sales reporting pipeline with actionable team alerts: Webhook captures new sales entries in real-time. The data is logged into Google Sheets. It retrieves all rows to compile current sales metrics. A custom node concatenates the data into an AI-friendly format. The Google Gemini Chat Model generates concise sales insights. HTML tags are cleaned up with a Remove HTML Tags node. The insights are classified (Good, Bad, Very Bad) using AI. Based on the classification: -- Teams are alerted via Telegram group messages. -- For negative insights, a Trello card backlog is created for follow-up. -- A Google Calendar meeting is scheduled automatically to discuss issues. An email summary is also sent out via Gmail to ensure no update is missed How to set up Import the workflow into your n8n instance. Configure the Webhook URL in your data source (POS, CRM, etc.). Connect Google Sheets, Google Gemini API, Trello, Telegram, and Google Calendar. Adjust classification logic inside the Classify Insight node if needed. Customize the message templates for email and Telegram. Test the workflow with sample data to validate automation flow. Requirements n8n account with active workflows. Google Sheets API credentials. Google Gemini API access. Telegram Bot Token & Group ID. Trello API Key & Token. Google Calendar API setup. Gmail or SMTP credentials for email notifications. How to customize the workflow Adjust the Concat Sales Data node if you want to include more fields or different data formats. Modify the Gemini prompt for personalized insight summaries. Change the classification thresholds (Good, Bad, Very Bad) based on your business KPIs. Update the notification messages in Telegram and Email nodes. Add or remove post-classification actions, like creating different task cards or sending escalations to other platforms (Slack, Microsoft Teams, etc.). Automate daily sales insights from Google Sheets using Gemini AI, classify results, and notify your team via email, Telegram, Trello, and Google Calendar instantly. Email Preview
by InfoGrab
This is a response chatbot in public channels through slash commands. I explain more in detail through the YouTube video, but it's only available in Korean. How it works? When you request the created slash command in Slack, the request comes to the webhook. Then, the Switch Node branches appropriately according to each slash command request. Here, a slash command called /ask is connected to the chatbot, and the chatbot generates answers to the questions asked. The final node responds to the channel. Set up steps Create a Slack app. Add chat:write permission in Slack OAuth&Permissions>Scopes. Create a Command in Slack Slash Commands menu and enter the n8n Webhook node's URL. Complete creating the Slash Commands. Enter the created command in the Switch node. 슬래시 커맨드를 통한 공개 채널에서의 응답 챗봇 입니다. 유튜브 영상에 더 자세하게 설명 드립니다. 설명 슬랙에 생성한 슬래시 커맨드를 슬랙에서 요청하면 웹훅에 요청이 들어옵니다. 이후 Switch Node에서 각 슬래시 커맨드의 요청에 따라 알맞게 분기합니다. 여기에서는 /ask라는 슬래시 커맨드가 챗봇으로 연결되어 있고, 챗봇에서 질문한 내용의 답변을 생성합니다. 마지막 노드에서 채널로 응답을 합니다. 설정 방법 Slack 앱을 만드세요. Slack OAuth&Permissions>Scopes 에서 chat:write 권한을 추가하세요. Slack Slash Commands 메뉴에서 Command를 생성하고, n8n Webhook 노드의 url을 입력하세요. Slash Slash Commands 생성을 완료하세요. Switch 노드에 생성한 커맨드를 입력하세요.
by David Olusola
🎨 AI Image Editor with Form Upload + Telegram Delivery 🚀 Who’s it for? 👥 This workflow is built for content creators, social media managers, designers, and agencies who need fast, AI-powered image editing without the hassle. Whether you're batch-editing for clients or spicing up personal projects, this tool gets it done — effortlessly. What it does 🛠️ A seamless pipeline that: 📥 Accepts uploads + prompts via a clean form ☁️ Saves images to Google Drive automatically 🧠 Edits images with OpenAI’s image API 📁 Converts results to downloadable PNGs 📬 Delivers the final image instantly via Telegram Perfect for AI-enhanced workflows that need speed, structure, and simplicity. How it works ⚙️ User Uploads: Fill a form with an image + editing prompt Cloud Save: Auto-upload to your Google Drive folder AI Editing: OpenAI processes the image with your prompt Convert & Format: Image saved as PNG Telegram Delivery: Final result sent straight to your chat 💬 You’ll need ✅ 🔑 OpenAI API key 📂 Google Drive OAuth2 setup 🤖 Telegram bot token & chat ID ⚙️ n8n instance (self-hosted or cloud) Setup in 4 Easy Steps 🛠️ 1. Connect APIs Add OpenAI, Google Drive, and Telegram credentials to n8n Store keys securely (avoid hardcoding!) 2. Configure Settings Set Google Drive folder ID Add Telegram chat ID Tweak image size (default: 1024×1024) 3. Deploy the Form Add a Webhook Trigger node Test with a sample image Share the form link with users 🎯 Fine-Tune Variables In the Set node, customize: 📐 Image size 📁 Folder path 📲 Delivery options ⏱️ Timeout duration Want to customize more? 🎛️ 🖼️ Image Settings Change size (e.g. 512x512 or 2048x2048) Update the model (when new versions drop) 📂 Storage Auto-organize files by date/category Add dynamic file names using n8n expressions 📤 Delivery Swap Telegram with Slack, email, Discord Add multiple delivery channels Include image prompt or metadata in messages 📝 Form Upgrades Add fields for advanced editing Validate file types (e.g. PNG/JPEG only) Show a progress bar for long edits ⚡ Advanced Features Add error handling or retry flows Support batch editing Include approvals or watermarking before delivery ⚠️ Notes & Best Practices ✅ Check OpenAI credit balance 🖼️ Test with different image sizes/types ⏱️ Adjust timeout settings for larger files 🔐 Always secure your API keys
by Ajith joseph
🤖 Create a Telegram Bot with Mistral AI and Conversation Memory A sophisticated Telegram bot that provides AI-powered responses with conversation memory. This template demonstrates how to integrate any AI API service with Telegram, making it easy to swap between different AI providers like OpenAI, Anthropic, Google AI, or any other API-based AI model. 🔧 How it works The workflow creates an intelligent Telegram bot that: 💬 Maintains conversation history for each user 🧠 Provides contextual AI responses using any AI API service 📱 Handles different message types and commands 🔄 Manages chat sessions with clear functionality 🔌 Easily adaptable to any AI provider (OpenAI, Anthropic, Google AI, etc.) ⚙️ Set up steps 📋 Prerequisites 🤖 Telegram Bot Token (from @BotFather) 🔑 AI API Key (from any AI service provider) 🚀 n8n instance with webhook capability 🛠️ Configuration Steps 🤖 Create Telegram Bot Message @BotFather on Telegram Create new bot with /newbot command Save the bot token for credentials setup 🧠 Choose Your AI Provider OpenAI: Get API key from OpenAI platform Anthropic: Sign up for Claude API access Google AI: Get Gemini API key NVIDIA: Access LLaMA models Hugging Face: Use inference API Any other AI API service 🔐 Set up Credentials in n8n Add Telegram API credentials with your bot token Add Bearer Auth/API Key credentials for your chosen AI service Test both connections 🚀 Deploy Workflow Import the workflow JSON Customize the AI API call (see customization section) Activate the workflow Set webhook URL in Telegram bot settings ✨ Features 🚀 Core Functionality 📨 Smart Message Routing**: Automatically categorizes incoming messages (commands, text, non-text) 🧠 Conversation Memory**: Maintains chat history for each user (last 10 messages) 🤖 AI-Powered Responses**: Integrates with any AI API service for intelligent replies ⚡ Command Support**: Built-in /start and /clear commands 📱 Message Types Handled 💬 Text Messages**: Processed through AI model with context 🔧 Commands**: Special handling for bot commands ❌ Non-text Messages**: Polite error message for unsupported content 💾 Memory Management 👤 User-specific chat history storage 🔄 Automatic history trimming (keeps last 10 messages) 🌐 Global state management across workflow executions 🤖 Bot Commands /start 🎯 - Welcome message with bot introduction /clear 🗑️ - Clears conversation history for fresh start Regular text 💬 - Processed by AI with conversation context 🔧 Technical Details 🏗️ Workflow Structure 📡 Telegram Trigger - Receives all incoming messages 🔀 Message Filtering - Routes messages based on type/content 💾 History Management - Maintains conversation context 🧠 AI Processing - Generates intelligent responses 📤 Response Delivery - Sends formatted replies back to user 🤖 AI API Integration (Customizable) Current Example (NVIDIA): Model: mistralai/mistral-nemotron Temperature: 0.6 (balanced creativity) Max tokens: 4096 Response limit: Under 200 words 🔄 Easy to Replace with Any AI Service: OpenAI Example: { "model": "gpt-4", "messages": [...], "temperature": 0.7, "max_tokens": 1000 } Anthropic Claude Example: { "model": "claude-3-sonnet-20240229", "messages": [...], "max_tokens": 1000 } Google Gemini Example: { "contents": [...], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 1000 } } 🛡️ Error Handling ❌ Non-text message detection and appropriate responses 🔧 API failure handling ⚠️ Invalid command processing 🎨 Customization Options 🤖 AI Provider Switching To use a different AI service, modify the "NVIDIA LLaMA Chat Model" node: 📝 Change the URL in HTTP Request node 🔧 Update the request body format in "Prepare API Request" node 🔐 Update authentication method if needed 📊 Adjust response parsing in "Save AI Response to History" node 🧠 AI Behavior 📝 Modify system prompt in "Prepare API Request" node 🌡️ Adjust temperature and response parameters 📏 Change response length limits 🎯 Customize model-specific parameters 💾 Memory Settings 📊 Adjust history length (currently 10 messages) 👤 Modify user identification logic 🗄️ Customize data persistence approach 🎭 Bot Personality 🎉 Update welcome message content ⚠️ Customize error messages and responses ➕ Add new command handlers 💡 Use Cases 🎧 Customer Support**: Automated first-line support with context awareness 📚 Educational Assistant**: Homework help and learning support 👥 Personal AI Companion**: General conversation and assistance 💼 Business Assistant**: FAQ handling and information retrieval 🔬 AI API Testing**: Perfect template for testing different AI services 🚀 Prototype Development**: Quick AI chatbot prototyping 📝 Notes 🌐 Requires active n8n instance for webhook handling 💰 AI API usage may have rate limits and costs (varies by provider) 💾 Bot memory persists across workflow restarts 👥 Supports multiple concurrent users with separate histories 🔄 Template is provider-agnostic - easily switch between AI services 🛠️ Perfect starting point for any AI-powered Telegram bot project 🔧 Popular AI Services You Can Use | Provider | Model Examples | API Endpoint Style | |----------|---------------|-------------------| | 🟢 OpenAI | GPT-4, GPT-3.5 | https://api.openai.com/v1/chat/completions | | 🔵 Anthropic | Claude 3 Opus, Sonnet | https://api.anthropic.com/v1/messages | | 🔴 Google | Gemini Pro, Gemini Flash | https://generativelanguage.googleapis.com/v1beta/models/ | | 🟡 NVIDIA | LLaMA, Mistral | https://integrate.api.nvidia.com/v1/chat/completions | | 🟠 Hugging Face | Various OSS models | https://api-inference.huggingface.co/models/ | | 🟣 Cohere | Command, Generate | https://api.cohere.ai/v1/generate | Simply replace the HTTP Request node configuration to switch providers!
by MattF
This workflow helps SEO teams catch top movers in Google Search Console by comparing daily performance across keyword segments like brand, nonbrand, and content categories. Instead of serving as a routine check, it highlights the queries and pages with the biggest jumps or drops, making it ideal for spotting wins, losses, or unexpected shifts early. How It Works Runs daily on a scheduled trigger (e.g. every morning). Pulls GSC data for the prior two days (e.g. yesterday vs. day before). Segments traffic by keyword type or URL pattern (e.g. brand, nonbrand, recipes, blogs, etc.). Calculates changes in clicks, impressions, CTR, and average position. Flags top movers with the biggest positive or negative deltas. Sends structured reports via Slack or email, grouped by segment and sorted by impact. Setup Steps Connect your Google Search Console account and optionally Gmail or Slack. Swap in your own domain(s) and customize segmentation logic (e.g. brand terms, path filters). By default, the workflow includes Slack alerts, but these can be easily switched to or combined with email, webhook, or other channels. Full setup takes around 15–20 minutes with working GSC credentials. Note: The “recipes” segment is included as an example of how to segment content. This can be changed to match blog, FAQ, product pages, or any other category.
by ankitkansaldev
🎬 TikTok Influencer Scraper (URL Input) via Bright Data + n8n & Sheets A comprehensive n8n automation that scrapes TikTok influencer profiles using Bright Data's TikTok dataset and automatically saves detailed profile information to Google Sheets. 📋 Overview This workflow provides an automated TikTok influencer data collection solution that scrapes comprehensive profile information and saves it to Google Sheets. Perfect for influencer marketing research, competitor analysis, social media monitoring, and marketing campaign planning. ✨ Key Features 📝 Form-Based Input: Simple web form to submit TikTok profile URLs 🤖 Bright Data Integration: Uses Bright Data's TikTok dataset for reliable scraping ⏳ Status Monitoring: Intelligent polling system to check scraping progress 🔄 Retry Logic: Automatic retry mechanism with 30-second intervals 📊 Data Extraction: Comprehensive profile data including engagement metrics 📈 Google Sheets Storage: Automatic data storage and organization ⚡ Error Handling: Built-in error handling and status reporting 🎯 Custom Fields: Configurable output fields for specific data needs 🎯 What This Workflow Does Input Profile URLs**: TikTok profile URLs submitted through web form Custom Fields**: Configurable data fields for extraction Country Settings**: Geo-targeting for accurate data collection Processing Form Submission: User submits TikTok profile URL through web form API Trigger: Sends profile data to Bright Data for scraping Status Polling: Continuously checks scraping progress Wait & Retry: Implements 30-second delays between status checks Data Retrieval: Fetches complete profile data when ready Sheet Update: Saves extracted data to Google Sheets Status Reporting: Provides completion status and messages Output Data Points | Field | Description | Example | |-------|-------------|---------| | Account ID | Unique TikTok account identifier | @username123 | | Nickname | Display name on profile | "John Doe" | | Biography | Profile bio/description | "Content creator & influencer" | | Followers | Number of followers | 1,250,000 | | Following | Number of accounts following | 500 | | Likes | Total likes across all videos | 50,000,000 | | Videos Count | Total number of videos posted | 1,200 | | Profile URL | Direct link to TikTok profile | https://www.tiktok.com/@username | | Profile Picture | Profile image URL | https://p16-sign-sg.tiktokcdn.com/... | | Profile Picture HD | High-definition profile image | https://p16-sign-sg.tiktokcdn.com/... | | Is Verified | Verification status | true/false | | Bio Link | External link in bio | https://linktr.ee/username | | Like Engagement Rate | Engagement rate based on likes | 5.2% | | Comment Engagement Rate | Engagement rate based on comments | 2.1% | | Top Videos | List of top performing videos | [video_objects] | | Region | Geographic region | "US" | | Is Under Age 18 | Age status indicator | true/false | 🚀 Setup Instructions Prerequisites n8n instance (self-hosted or cloud) Google account with Sheets access Bright Data account with TikTok dataset access Valid TikTok profile URLs for testing 10-15 minutes for setup Step 1: Import the Workflow Copy the JSON workflow code from the provided file In n8n: Workflows → + Add workflow → Import from JSON Paste JSON and click Import Step 2: Configure Bright Data Set up Bright Data credentials: In n8n: Credentials → + Add credential → HTTP Request Generic Credential Name: "Bright Data API" Authentication: Bearer Token Token: Your Bright Data API key Test the connection Configure dataset: Ensure you have access to TikTok dataset (gd_l1villgoiiidt09ci) Verify dataset permissions in Bright Data dashboard Check dataset limits and pricing Step 3: Configure Google Sheets Integration Create a Google Sheet: Go to Google Sheets Create a new spreadsheet named "TikTok Influencer Data" Create a sheet tab named "TikTok profile by url" Copy the Sheet ID from URL: https://docs.google.com/spreadsheets/d/SHEET_ID_HERE/edit Set up Google Sheets credentials: In n8n: Credentials → + Add credential → Google Sheets OAuth2 API Complete OAuth setup and test connection Prepare your data sheet with columns: Column A: Account ID Column B: Nickname Column C: Biography Column D: Followers Column E: Following Column F: Likes Column G: Videos Count Column H: Profile URL Column I: Is Verified Column J: Bio Link Column K: Like Engagement Rate Column L: Comment Engagement Rate Column M: Region Column N: Status Column O: Message Step 4: Update Workflow Settings Update API credentials: Open "Sends profile URLs to Bright Data to trigger scraping" node Replace BRIGHT_DATA_API_KEY with your actual API key Update dataset ID if different Update Google Sheets nodes: Open "Google Sheets" node Replace document ID: 1OeqtCFm4Wek9DI5YFOWQXTpQJS-SJxC10iAPKEKkmiY Select your Google Sheets credential Choose the correct sheet/tab name Configure form settings: Open "Search by Profile URL" node Customize form title and field labels as needed Note the webhook URL for form access Step 5: Test & Activate Add test profiles: Access the form using the webhook URL Submit 1-2 TikTok profile URLs for testing Use full URLs (e.g., https://www.tiktok.com/@username) Test the workflow: Submit a test profile through the form Monitor execution in n8n Verify data appears in Google Sheet Check for any error messages 📖 Usage Guide Submitting TikTok Profiles Navigate to your form URL (found in Form Trigger node) Enter TikTok profile URL in the format: https://www.tiktok.com/@username Click Submit to start the scraping process Wait for processing (typically 1-3 minutes) Understanding the Process The workflow follows this sequence: Form Submission → Profile URL captured API Trigger → Scraping job submitted to Bright Data Status Polling → Checks every 30 seconds if data is ready Data Retrieval → Fetches complete profile information Sheet Update → Saves data to Google Sheets Monitoring Progress Check n8n execution logs for real-time status Bright Data dashboard shows scraping progress Google Sheets will populate when data is ready Status column shows "ready" when complete Reading the Results Your Google Sheet will show: Complete TikTok profile information Engagement metrics and statistics Profile verification status Bio links and external connections Timestamp of data collection 🔧 Customization Options Adding More Data Points Edit the JSON body in "Sends profile URLs to Bright Data" node to include additional fields: "custom_output_fields": [ "account_id", "nickname", "biography", "followers", "following", "likes", "videos_count", "language", "creation_time", "last_post_time", "avg_video_duration", "hashtags_used", "music_used" ] Modifying Input Parameters Customize the scraping parameters: Country targeting**: Change "country" field in input Search limits**: Adjust "limit_per_input" value Discovery method**: Modify "discover_by" parameter Error handling**: Toggle "include_errors" setting Batch Processing Multiple Profiles To process multiple profiles simultaneously: Modify the input array in the API call Add multiple profile URLs in single request Implement loop logic for processing results Add rate limiting between requests Custom Form Fields Enhance the form with additional inputs: Open "Search by Profile URL" node Add form fields for: Country selection Number of videos to analyze Specific date ranges Custom tags or categories 🚨 Troubleshooting Common Issues & Solutions "Bright Data connection failed" Cause: Invalid API credentials or dataset access Solution: Verify API key in Bright Data dashboard, check dataset permissions "Profile not found or private" Cause: Invalid TikTok URL or private profile Solution: Verify profile URL format, ensure profile is public "Google Sheets permission denied" Cause: Incorrect credentials or sheet permissions Solution: Re-authenticate Google Sheets, check sheet sharing settings "Scraping timeout" Cause: Profile data taking too long to process Solution: Increase wait time or implement longer polling intervals "Invalid dataset ID" Cause: Incorrect or expired dataset configuration Solution: Check Bright Data dashboard for correct dataset ID "Form submission failed" Cause: Webhook configuration issues Solution: Verify webhook URL and form trigger settings Advanced Troubleshooting Check execution logs** in n8n for detailed error messages Test individual nodes** by running them separately Verify data formats** ensure URLs are properly formatted Monitor API limits** check Bright Data usage quotas Add error handling** implement try-catch logic for robust operation 📊 Use Cases & Examples 1. Influencer Marketing Research Goal: Identify and analyze potential influencers for campaigns Research influencers in specific niches Analyze engagement rates and audience size Compare multiple influencers for campaign selection Track influencer growth over time 2. Competitive Analysis Goal: Monitor competitors' TikTok presence and performance Track competitor follower growth Analyze content strategies and engagement Monitor posting frequency and timing Identify trending content themes 3. Social Media Monitoring Goal: Track brand mentions and user-generated content Monitor branded hashtag usage Track brand advocates and micro-influencers Analyze sentiment and engagement patterns Identify trending topics in your industry 4. Market Research Pipeline Goal: Gather social media intelligence for business decisions Analyze target audience behavior Study content preferences and trends Generate reports for stakeholders Support marketing strategy development ⚙ Advanced Configuration Rate Limiting and Performance To optimize for large-scale scraping: Adjust wait times between status checks Implement exponential backoff for retries Add batch processing for multiple profiles Monitor API usage to avoid limits Data Validation and Cleaning Enhance data quality with validation: Add data type validation for numeric fields Implement URL format checking Clean and standardize text fields Add data completeness checks Integration with Business Tools Connect the workflow to your existing systems: CRM Integration**: Update customer records with influencer data Slack Notifications**: Send alerts when new data is available Database Storage**: Store data in PostgreSQL/MySQL for analysis BI Tools**: Connect to Tableau/Power BI for visualization Webhook Integration For real-time updates: Add webhook triggers for immediate profile checks Integrate with external systems via webhooks Create API endpoints for programmatic access Implement authentication for secure access 📈 Performance & Limits Expected Performance Single Profile**: 30-60 seconds average processing time Concurrent Requests**: 5-10 simultaneous (depends on Bright Data plan) Data Accuracy**: 95%+ for public TikTok profiles Success Rate**: 90%+ for accessible profiles Daily Capacity**: 100-1000 profiles (depends on rate limits) Resource Usage Memory**: ~50MB per execution Storage**: Minimal (data stored in Google Sheets) API Calls**: 3-5 Bright Data calls per profile (including status checks) Bandwidth**: ~1-2MB per profile scraped Execution Time**: 1-2 minutes per profile Scaling Considerations Rate Limiting**: Add delays for high-volume scraping Error Handling**: Implement retry logic for failed requests Data Validation**: Add checks for malformed profile data Monitoring**: Track success/failure rates over time Cost Optimization**: Monitor API usage to control costs 🤝 Support & Community Getting Help n8n Community Forum**: community.n8n.io Documentation**: docs.n8n.io Bright Data Support**: Contact through your dashboard GitHub Issues**: Report bugs and feature requests Contributing Share improvements with the community Report issues and suggest enhancements Create variations for specific use cases Document best practices and lessons learned 📋 Quick Setup Checklist Before You Start ☐ n8n instance running (self-hosted or cloud) ☐ Google account with Sheets access ☐ Bright Data account with TikTok dataset access ☐ Valid TikTok profile URLs for testing ☐ 15 minutes for setup Setup Steps ☐ Import Workflow - Copy JSON and import to n8n ☐ Configure Bright Data - Set up API credentials and test ☐ Create Google Sheet - New sheet with proper column structure ☐ Set up Google Sheets credentials - OAuth setup and test ☐ Update workflow settings - Replace sheet ID and API keys ☐ Test with sample profiles - Submit 1-2 URLs and verify results ☐ Activate workflow - Enable form trigger for production use Ready to Use! 🎉 Your form URL: https://your-n8n-instance.com/form/[webhook-id] 🎯 Happy TikTok Scraping! This workflow provides a solid foundation for automated TikTok influencer data collection. Customize it to fit your specific needs and use cases for influencer marketing, competitive analysis, and social media research.
by Ferenc Erb
Use Case Automate chat interactions in Bitrix24 with a customizable bot that can handle various events and respond to user messages. What This Workflow Does Processes incoming webhook requests from Bitrix24 Handles authentication and token validation Routes different event types (messages, joins, installations) Provides automated responses and bot registration Manages secure communication between Bitrix24 and external services Setup Instructions Configure Bitrix24 webhook endpoints Set up authentication credentials Customize bot responses and behavior Deploy and test the workflow
by Agent Studio
Overview This workflow allows you to trigger custom logic in n8n directly from Retell's Voice Agent using Custom Functions. It captures a POST webhook from Retell every time a Voice Agent reaches a Custom Function node. You can plug in any logic—call an external API, book a meeting, update a CRM, or even return a dynamic response back to the agent. Who is it for For builders using Retell who want to extend Voice Agent functionality with real-time custom workflows or AI-generated responses. Prerequisites Have a Retell AI Account A Retell agent with a Custom Function node in its conversation flow (see template below) Set your n8n webhook URL in the Custom Function configuration (see "How to use it" below) (Optional) Familiarity with Retell's Custom Function docs Start a conversation with the agent (text or voice) Retell Agent Example To get you started, we've prepared a Retell Agent ready to be imported, that includes the call to this template. Import the agent to your Retell workspace (top-right button on your agent's page) You will need to modify the function URL in order to call your own instance. This template is a simple hotel agent that calls the custom function to confirm a booking, passing basic formatted data. How it works Retell sends a webhook to n8n whenever a Custom Function is triggered during a call (or test chat). The webhook includes: Full call context (transcript, call ID, etc.) Parameters defined in the Retell function node You can process this data and return a response string back to the Voice Agent in real-time. How to use it Copy the webhook URL (e.g. https://your-instance.app.n8n.cloud/webhook/hotel-retell-template) Modify the Retell Custom Function webhook URL (see template description for screenshots) Edit the function Modify the URL Modify the logic in the Set node or replace it with your own custom flow Deploy and test: Retell will hit your n8n workflow during the conversation Extension Ideas Call a third-party API to fetch data (e.g. hotel availability, CRM records) Use an LLM node to generate dynamic responses Trigger a parallel automation (Slack message, calendar invite, etc.) 👉 Reach out to us if you're interested in analyzing your Retell Agent conversations.