Build a tax code assistant with Qdrant, Mistral.ai and OpenAI
This n8n workflows builds another example of creating a knowledgebase assistant but demonstrates how a more deliberate and targeted approach to ingesting the data can produce much better results for your chatbot. In this example, a government tax code policy document is used. Whilst we could split the document into chunks by content length, we often lose the context of chapters and sections which may be required by the user. Our approach then is to first split the document into chapters and sections before importing into our vector store. Additionally, using metadata correctly is key to allow filtering and scoped queries. Example Human: "Tell me about what the tax code says about cargo for intentional commerce?" AI: "Section 11.25 of the Texas Property Tax Code pertains to "MARINE CARGO CONTAINERS USED EXCLUSIVELY IN INTERNATIONAL COMMERCE." In this section, a person who is a citizen of a foreign country or an en..." How it works The tax code policy document is downloaded as a zip file from the government website and its pages are extracted as separate chapters. Each chapter is then parsed and split into its sections using data manipulation expressions. Each section is then inserted into our Qdrant vector store tagged with its source, chapter and section numbers as metadata. When our AI Agent needs to retrieve data from our vector store, we use a custom workflow tool to perform the query to Qdrant. Because we're relying on Qdrant's advanced filtering capabilities, we perform the search using the Qdrant API rather than the Qdrant node. When the AI Agent, needs to pull full wording or extracts, we can use Qdrant's scroll API and metadata filtering to do so. This makes Qdrant behave like a key-value store for our document. Requirements A Qdrant instance is required for the vector store and specifically for it's filtering functionality. Mistral.ai account for Embeddings and AI models. Customising this workflow Depending on your use-case, consider returning actual PDF pages (or links) to the user for the extra confirmation and to build trust. Not using Mistral? You are able to replace but note to match the distance and dimension size of Qdrant collection to your chosen embedding model.
Fetch dynamic prompts from GitHub and auto-populate n8n expressions in prompt
Who Is This For? This workflow is designed for AI engineers, automation specialists, and content creators who need a scalable system to dynamically manage prompts stored in GitHub. It eliminates manual updates, enforces required variable checks, and ensures that AI interactions always receive fully processed prompts. --- π What Problem Does This Solve? Manually managing AI prompts can be inefficient and error-prone. This workflow: β Fetches dynamic prompts from GitHub β Auto-populates placeholders with values from the setVars node β Ensures all required variables are present before execution β Processes the formatted prompt through an AI agent --- π How This Workflow Works This workflow consists of three key branches, ensuring smooth prompt retrieval, variable validation, and AI processing. --- 1οΈβ£ Retrieve the Prompt from GitHub (HTTP Request β Extract from File β SetPrompt) The workflow starts manually or via an external trigger. It fetches a text-based prompt stored in a GitHub repository. The Extract from File Node retrieves the content from the GitHub file. The SetPrompt Node stores the prompt, making it accessible for processing. π Note: The prompt must contain n8n expression format variables (e.g., {{ $json.company }}) so they can be dynamically replaced. --- 2οΈβ£ Extract & Auto-Populate Variables (Check All Prompt Vars β Replace Variables) A Code Node scans the prompt for placeholders in the n8n expression format ({{ $json.variableName }}). The workflow compares required variables against the setVars node: β If all variables are present, it proceeds to variable replacement. β If any variables are missing, the workflow stops and returns an error listing them. The Replace Variables Node replaces all placeholders with values from setVars. π Example of a properly formatted GitHub prompt: Hello {{ $json.company }}, your product {{ $json.features }} launches on {{ $json.launch_date }}. This ensures seamless replacement when processed in n8n. --- 3οΈβ£ AI Processing & Output (AI Agent β Prompt Output) The Set Completed Prompt Node stores the final, processed prompt. The AI Agent Node (Ollama Chat Model) processes the prompt. The Prompt Output Node returns the fully formatted response. π Optional: Modify this to use OpenAI, Claude, or other AI models. --- β οΈ Error Handling: Missing Variables If a required variable is missing, the workflow stops execution and provides an error message: β οΈ Missing Required Variables: ["launch_date"] This ensures no incomplete prompts are sent to AI agents. --- β Example Use Case π GitHub Prompt File (Using n8n Expressions) Hello {{ $json.company }}, your product {{ $json.features }} launches on {{ $json.launch_date }}. πΉ Variables in setVars Node json { "company": "PropTechPro", "features": "AI-powered Property Management", "launch_date": "March 15, 2025" } β Successful Output Hello PropTechPro, your product AI-powered Property Management launches on March 15, 2025. π¨ Error Output (If Missing launch_date) β οΈ Missing Required Variables: ["launch_date"] --- π§ Setup Instructions 1οΈβ£ Connect Your GitHub Repository Store your prompt in a public or private GitHub repo. The workflow will fetch the raw file using the GitHub API. 2οΈβ£ Configure the SetVars Node Define the required variables in the SetVars Node. Make sure the variable names match those used in the prompt. 3οΈβ£ Test & Run Click Test Workflow to execute. If variables are missing, it will show an error. If everything is correct, it will output the fully formatted prompt. --- β‘ How to Customize This Workflow π‘ Need CRM or Database Integration? Connect the setVars node to an Airtable, Google Sheets, or HubSpot API to pull variables dynamically. π‘ Want to Modify the AI Model? Replace the Ollama Chat Model with OpenAI, Claude, or a custom LLM endpoint. --- π Why Use This Workflow? β No Manual Updates Required β Fetches prompts dynamically from GitHub. β Prevents Broken Prompts β Ensures required variables exist before execution. β Works for Any Use Case β Handles AI chat prompts, marketing messages, and chatbot scripts. β Compatible with All n8n Deployments β Works on Cloud, Self-Hosted, and Desktop versions.
Generate 360Β° virtual try-on videos for clothing with Kling API (unofficial)
What's the workflow used forοΌ Leverage this Kling API (unofficial) provided by PiAPI workflow to streamline virtual try-on video creation. This tool is designed for e-commerce platforms, fashion brands, content creators and content influencers. By uploading model and clothing images and linking PiAPI account, users can swiftly generate a realistic video of the model sporting the outfit with a 360Β° turn, offering an immersive viewing experience. Step-by-step Instruction For basic settings of virtual try-on, check API doc to get best practice. Fill in your X-API-Key of your PiAPI account in Preset Parameters node. Upload the model photo and provide target clothing image urls. Click Test Workflow to generate virtual try-on image. Get the video output in the final node. Param Settings If you want to change into a dress, input the modelinput URL and the dressinput URL in the parameters. If you want to change into separates, input modelinput URL, upperinput URL and lower_input URL in Preset Parameters. Use Case Input imagesοΌ Output Video <video src="https://static.piapi.ai/n8n-instruction/virtual-try-on/example1.mp4" controls /> The output demonstrates that the model is wearing the clothing from the specified image and showcases a rotating runway-style view. This workflow enables you to efficiently test garment-on-model presentation effects while reducing business model validation costs to a certain extent.
Create a complete HR department with OpenAI O3 and GPT-4.1-mini multi-agent system
CHRO Agent with HR Team Description Complete AI-powered HR department with a Chief Human Resources Officer (CHRO) agent orchestrating specialized HR team members for comprehensive people operations. Overview This n8n workflow creates a comprehensive human resources department using AI agents. The CHRO agent analyzes HR requests and delegates tasks to specialized agents for recruitment, policy development, training, performance management, employee engagement, and compensation analysis. Features Strategic CHRO agent using OpenAI O3 for complex HR decision-making Six specialized HR agents powered by GPT-4.1-mini for efficient execution Complete HR lifecycle coverage from hiring to retention Automated policy creation and compliance documentation Performance review and goal-setting systems Employee engagement and culture initiatives Compensation analysis and benchmarking Team Structure CHRO Agent: Strategic HR oversight and task delegation (O3 model) Recruiter Agent: Job descriptions, candidate screening, interview questions HR Policy Writer: Employee handbooks, policies, compliance documentation Training & Development Specialist: Onboarding programs, learning materials Performance Review Specialist: Reviews, feedback templates, goal setting Employee Engagement Specialist: Culture initiatives, team building, communications Compensation & Benefits Analyst: Salary benchmarking, benefits packages How to Use Import the workflow into your n8n instance Configure OpenAI API credentials for all chat models Deploy the webhook for chat interactions Send HR requests via chat (e.g., "Create a complete onboarding program for software engineers") The CHRO will analyze and delegate to appropriate specialists Receive comprehensive HR deliverables Use Cases Complete Hiring Process: Job postings β Screening β Interviews β Offers Policy Development: Employee handbooks, compliance documentation Onboarding Programs: 30-60-90 day plans with training materials Performance Management: Review cycles, feedback systems, development plans Culture & Engagement: Surveys, team building activities, recognition programs Compensation Strategy: Market analysis, pay equity reviews, benefits design Requirements n8n instance with LangChain nodes OpenAI API access (O3 for CHRO, GPT-4.1-mini for specialists) Webhook capability for chat interactions Optional: Integration with HRIS systems Cost Optimization O3 model used only for strategic CHRO decisions GPT-4.1-mini provides 90% cost reduction for specialist tasks Parallel processing enables simultaneous agent execution Template library reduces redundant content generation Integration Options Connect to HRIS systems (Workday, BambooHR, etc.) Integrate with applicant tracking systems Link to performance management platforms Export to document management systems Contact & Resources Website: nofluff.online YouTube: @YaronBeen LinkedIn: Yaron Been Tags HRTech PeopleOperations TalentAcquisition EmployeeExperience HRAutomation AIRecruitment PerformanceManagement CompensationBenefits OnboardingAutomation CultureTech n8n OpenAI MultiAgentSystem FutureOfWork HRTransformation
Smart message batching AI-powered Facebook Messenger chatbot
π€ Facebook Messenger Smart Chatbot - Smart Batch, Format & History with n8n Data Table v3 Version 2026 - Adaptable to n8n v1.113+ and v2.x by Nguyen Thieu Toan (Jay Nguyen) --- π Overview A production-ready, enterprise-grade chatbot solution for Facebook Messenger built entirely in n8n. Features intelligent message batching, session-aware conversation tracking, multi-page support, and natural AI-powered responses. Perfect for: πΌ Customer support automation π E-commerce product inquiries π Appointment scheduling & consultation booking π Educational assistants & training π€ Lead qualification & sales automation Requirements: n8n v1.113.0+, Facebook App with Messenger, Google Gemini API key (or compatible LLM) π Complementary Workflow Facebook Messenger Chatbot β Smart Human Takeover, Auto Pause & Context-Aware Adds intelligent human agent detection and automatic AI pause. When a human joins, AI pauses for configurable duration, then resumes automatically. Why combine? Smart Batch (v3): Multi-message batching, spam reduction Human Takeover: AI pauses for humans, smooth collaboration π Access workflow --- β‘ What's New in Version 3 Major Upgrades | Feature | Impact | |---------|--------| | π’ Multi-Page Support | Manage multiple pages within one workflow | | β±οΈ Flexible Timing | Adjustable wait times instead of fixed delays | | π Improved Detection | More reliable identification of system vs. user messages | | π¦ Smart Delivery | Sequential message handling to avoid overload | | π§Ή Automatic Cleanup | Removes outdated records to keep storage efficient | | π Better Context | Clear separation of past vs. current sessions | | π Ordered Updates | Ensures actions run in the right sequence | | π Simplified Naming | Clearer labels for easier understanding | Architecture Comparison: Previous version had fixed timing, parallel updates, no multi-page handling, and no cleanup. New version introduces flexibility, sequential processing, and scalability for real-world use. --- π― Key Features π Smart Batching: Groups consecutive messages within configurable window (default 7s) π§ Session-Aware Context: Distinguishes old vs. current sessions for temporal awareness π Full History: Stores complete chat logs with both user and page responses π Natural UX: "Seen" marker and "Typing..." indicator for human-like feel π― AI Integration: Extensible prompts for domain-specific consulting (Gemini, Groq, or any LLM) π Multi-Language: Handles Vietnamese (anh/chα»/em) with customizable settings π’ Multi-Page Ready: Single workflow serves multiple Facebook Pages simultaneously Technical Highlights: Idempotent processing, timezone-aware timestamps (Asia/HoChiMinh), Facebook API v24.0 compatible, sequential delivery with rate limiting protection, auto cleanup (keeps last 15 rows) --- ποΈ How It Works π General Flow Reception & Validation β Batching & Storage β Context Aggregation β β β Identify input Store for later use Combine with history Filter duplicates Apply short delay Build conversation context β AI Processing β Delivery & Cleanup β β Generate response Format & send Add signals Maintain records Ensure continuity Clean old data --- π οΈ Setup Guide Step 1: Facebook App Create app, add Messenger, set webhook, get token, subscribe page Step 2: Data Table Prepare tables for messages batching Step 3: Workflow Import template, set context, link tables, connect AI Step 4: Test Activate workflow, send test messages, verify pause/resume --- π€ About the Author Nguyen Thieu Toan (Nguyα» n Thiα»u ToΓ n / Jay Nguyen) AI Automation Specialist | n8n Workflow Expert | Business Optimization Consultant Services: AI Automation Solutions, n8n Workflow Development, Custom Chatbot Implementation, Training Programs Contact: π nguyenthieutoan.com π Facebook πΌ LinkedIn π¦ X (Twitter) πΊ YouTube π§ me@nguyenthieutoan.com GenStaff Company: genstaff.net | contact@genstaff.net --- π License After purchase, use in commercial/personal projects. No redistribution or resale. Keep author attribution when sharing. --- Last Updated: December 18, 2025 | Version: 3.0 | n8n Compatibility: v1.123.0+ and v2.0.0+ | Facebook API: v24.0 --- Ready to transform your Facebook Messenger into an intelligent AI assistant? Import this workflow and start automating today! π
Automate WooCommerce image product background removal using API and Google Sheet
This workflow automates the process of removing backgrounds from WooCommerce product images using the BackgroundCut API, and then updates the product images in both WooCommerce and a Google Sheet. Once set up, the workflow processes product images in bulk, removing backgrounds and updating WooCommerce seamlessly. This workflow is perfect for online stores that sell: Clothing and fashion items Jewelry and accessories General consumer products Any product that benefits from clean, background-free images for a professional storefront presentation will see improved visual appeal and potentially higher conversions. --- Benefits β± Time-saving: Automates what would otherwise be a manual and repetitive task of editing images and updating product listings. π Fully Integrated: Connects Google Sheets, BackgroundCut API, FTP server, and WooCommerce in a seamless loop. π¦ Scalable: Supports batch processing, making it suitable for stores with hundreds of products. π Organized Tracking: Updates the Google Sheet with the new image and a βDONEβ flag for easy monitoring. π§ Customizable: You can change the image processing API, storage server, or eCommerce platform if needed. --- How It Works Data Retrieval: The workflow starts by fetching product data (ID and IMAGE URL) from a Google Sheets document. Only rows without a "DONE" marker are processed to avoid duplicates. Background Removal: Each product image URL is sent to the BackgroundCut API, which removes the background and returns the edited image. File Handling: The processed image is uploaded to an FTP server with the original filename preserved. A new URL for the edited image is generated and assigned to the product. WooCommerce Update: The product in WooCommerce is updated with the new image URL. Sheet Update: The Google Sheet is marked as "DONE" for the processed row, and the new image URL is recorded. Batch Processing: The workflow loops through all rows in the sheet until all products are processed. --- Set Up Steps Prepare the Google Sheet: Clone the provided Google Sheet template. Fill in the ID (product ID) and IMAGE (original image URL) columns. API & Credentials Setup: Get an API key from BackgroundCut.co. Configure the HTTP Request node ("Remove from Image URL") with: Header Auth: Authorization = API_KEY. Set up WooCommerce API credentials in the "Update product" node. FTP Configuration: Replace YOURFTPURL in the "New Image Url" node with your FTP/CDN base URL. Ensure FTP credentials are correctly set in the FTP node. Execution: Run the workflow manually via "When clicking βExecute workflowβ". The process automatically handles background removal, file upload, and WooCommerce updates. ---- Need help customizing? Contact me for consulting and support or add me on Linkedin.
Sum or aggregate a column of spreadsheet or table data
This workflow shows how to sum multiple items of data, like you would in Excel or Airtable when summing up the total of a column. It uses a Function node with some javascript to perform the aggregation of numeric data. The first node is simply mock data to avoid needing a credential to run the workflow. The second node actually performs the summation - the javascript has various comments in case you need to edit the JS. For example, to sum multiple items of data. Below is an example of the type of data this workflow can sum - so anything that is in a tabular form (Airtable, GSHeets, Postgres etc).
Flight data visualization with Chart.js, QuickChart API & Telegram Bot
π Real-Time Flight Data Analytics Bot with Dynamic Chart Generation via Telegram π Template Overview This advanced n8n workflow creates an intelligent Telegram bot that transforms raw CSV flight data into stunning, interactive visualizations. Users can generate professional charts on-demand through a conversational interface, making data analytics accessible to anyone via messaging. Key Innovation: Combines real-time data processing, Chart.js visualization engine, and Telegram's messaging platform to deliver instant business intelligence insights. π― What This Template Does Transform your flight booking data into actionable insights with four powerful visualization types: π Bar Charts: Top 10 busiest airlines by flight volume π₯§ Pie Charts: Flight duration distribution (Short/Medium/Long-haul) π© Doughnut Charts: Price range segmentation with average pricing π Line Charts: Price trend analysis across flight durations Each chart includes auto-generated insights, percentages, and key business metrics delivered instantly to users' phones. ποΈ Technical Architecture Core Components Telegram Webhook Trigger: Captures user interactions and button clicks Smart Routing Engine: Conditional logic for command detection and chart selection CSV Data Pipeline: File reading β parsing β JSON transformation Chart Generation Engine: JavaScript-powered data processing with Chart.js Image Rendering Service: QuickChart API for high-quality PNG generation Response Delivery: Binary image transmission back to Telegram Data Flow Architecture User Input β Command Detection β CSV Processing β Data Aggregation β Chart Configuration β Image Generation β Telegram Delivery π οΈ Setup Requirements Prerequisites n8n instance (self-hosted or cloud) Telegram Bot Token from @BotFather CSV dataset with flight information Internet connectivity for QuickChart API Dataset Source This template uses the Airlines Flights Data dataset from GitHub: π Dataset: Airlines Flights Data by Rohit Grewal Required Data Schema Your CSV file should contain these columns: csv airline,flight,sourcecity,departuretime,arrivaltime,duration,price,class,destinationcity,stops File Structure /data/ βββ flights.csv (download from GitHub dataset above) βοΈ Configuration Steps Telegram Bot Setup Create a new bot via @BotFather on Telegram Copy your bot token Configure the Telegram Trigger node with your token Set webhook URL in your n8n instance Data Preparation Download the dataset from Airlines Flights Data Upload the CSV file to /data/flights.csv in your n8n instance Ensure UTF-8 encoding Verify column headers match the dataset schema Test file accessibility from n8n Workflow Activation Import the workflow JSON Configure all Telegram nodes with your bot token Test the /start command Activate the workflow π§ Technical Implementation Details Chart Generation Process Bar Chart Logic: javascript // Aggregate airline counts const airlineCounts = {}; flights.forEach(flight => { const airline = flight.airline || 'Unknown'; airlineCounts[airline] = (airlineCounts[airline] || 0) + 1; }); // Generate Chart.js configuration const chartConfig = { type: 'bar', data: { labels, datasets }, options: { responsive: true, plugins: {...} } }; Dynamic Color Schemes: Bar Charts: Professional blue gradient palette Pie Charts: Duration-based color coding (lightβdark blue) Doughnut Charts: Price-tier specific colors (greenβpurple) Line Charts: Trend-focused red gradient with smooth curves Performance Optimizations Efficient Data Processing: Single-pass aggregations with O(n) complexity Smart Caching: QuickChart handles image caching automatically Minimal Memory Usage: Stream processing for large datasets Error Handling: Graceful fallbacks for missing data fields Advanced Features Auto-Generated Insights: Statistical calculations (percentages, averages, totals) Trend analysis and pattern detection Business intelligence summaries Contextual recommendations User Experience Enhancements: Reply keyboards for easy navigation Visual progress indicators Error recovery mechanisms Mobile-optimized chart dimensions (800x600px) π Use Cases & Business Applications Airlines & Travel Companies Fleet Analysis: Monitor airline performance and market share Pricing Strategy: Analyze competitor pricing across routes Operational Insights: Track duration patterns and efficiency Data Analytics Teams Self-Service BI: Enable non-technical users to generate reports Mobile Dashboards: Access insights anywhere via Telegram Rapid Prototyping: Quick data exploration without complex tools Business Intelligence Executive Reporting: Instant charts for presentations Market Research: Compare industry trends and benchmarks Performance Monitoring: Track KPIs in real-time π¨ Customization Options Adding New Chart Types Create new Switch condition Add corresponding data processing node Configure Chart.js options Update user interface menu Data Source Extensions Replace CSV with database connections Add real-time API integrations Implement data refresh mechanisms Support multiple file formats Visual Customizations javascript // Custom color palette backgroundColor: ['your-colors'], // Advanced styling borderRadius: 8, borderSkipped: false, // Animation effects animation: { duration: 2000, easing: 'easeInOutQuart' } π Security & Best Practices Data Protection Validate CSV input format Sanitize user inputs Implement rate limiting Secure file access permissions Error Handling Graceful degradation for API failures User-friendly error messages Automatic retry mechanisms Comprehensive logging π Expected Outputs Sample Generated Insights "βοΈ Vistara leads with 350+ flights, capturing 23.4% market share" "π Long-haul flights dominate at 61.1% of total bookings" "π° Budget category (βΉ0-10K) represents 47.5% of all bookings" "π Average prices peak at βΉ14K for 6-8 hour duration flights" Performance Metrics Response Time: <3 seconds for chart generation Image Quality: 800x600px high-resolution PNG Data Capacity: Handles 10K+ records efficiently Concurrent Users: Scales with n8n instance capacity π Getting Started Download the workflow JSON Import into your n8n instance Configure Telegram bot credentials Upload your flight data CSV Test with /start command Deploy and share with your team π‘ Pro Tips Data Quality: Clean data produces better insights Mobile First: Charts are optimized for mobile viewing Batch Processing: Handles large datasets efficiently Extensible Design: Easy to add new visualization types --- Ready to transform your data into actionable insights? Import this template and start generating professional charts in minutes! π
Pull references from Google AI mode to Google Sheets with DataForSEO
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Whoβs it for SEO analysts and marketers who want to capture and analyze source references from Googleβs AI Mode answers, track competitor mentions or measure brand visibility in generative search features. Note: this template uses DataForSEO community node and works for self-hosted n8n instances only. What it does This workflow automates the process of gathering source references from Googleβs AI Mode results. Using the DataForSEO SERP API, it extracts the source title, URL, and domain, and records that data in Google Sheets. You can use this template to monitor how often your site appears in AI-generated answers or what competitor domains get mentioned for your target keywords. How it works Triggers on your chosen schedule (default: every 7 days). Calls the DataForSEO SERP API for your keyword. Extracts and cleans Google AI Mode results. Stores the data in a Google Sheet. Requirements Self-hosted n8n instance DataForSEO account A Google Sheet that contains the Source, Domain, URL, Title, and Text columns (as in the example: https://docs.google.com/spreadsheets/d/1XCjkjyVxrtpTUQenHeR3B07xfEZ489mhuVidjhGOO7I/edit?usp=sharing). Customization You can change the schedule or swap the Google Sheet for BI dashboards or reporting tools.
Create nested data processing loops using n8n sub-workflows
Nested Loops with Sub-workflows Template Description This template provides a practical solution for a common n8n challenge: creating nested loops. While a powerful feature, n8n's standard Loop nodes don't work as expected in a nested structure. This template demonstrates the reliable workaround using a main workflow that calls a separate sub-workflow for each iteration. Purpose The template is designed to help you handle scenarios where you need to iterate through one list of data for every item in another list. This is a crucial pattern for combining or processing related data, ensuring your workflows are both clean and modular. Instructions for Setup This template contains both the main workflow and the sub-workflow on a single canvas. Copy the sub-workflow part of this template (starting with the Execute Sub-workflow Trigger node) and paste it into a new, empty canvas. In the Execute Sub-workflow node in the main workflow on this canvas, update the Sub-workflow field to link to the new workflow you just created. Run the main workflow to see the solution in action. For a detailed walkthrough of this solution, check out the full blog post
Generate UTM-tagged Bitly links from Slack with GPT-4o-mini and Google Sheets logging
π Slack + Bitly UTM Generator β Powered by OpenAI Description: This no-code n8n workflow transforms how marketing teams generate Bitly links with UTM parameters β directly from Slack. Powered by AI and fully automated, this system extracts relevant campaign data from a Slack message, creates a clean Bitly shortlink with UTM tags, and logs everything to a Google Sheet for tracking and reporting. Perfect for growth marketers, content teams, and anyone tired of manually building UTM-tagged links. If you like to follow step-by-step build of workflows like these, check out: https://www.youtube.com/@Automatewithmarc βοΈ How It Works π’ Slack Trigger The workflow starts when a user mentions the bot in a Slack channel (e.g., @BitlyBot link this for IG campaign). π§ AI Agent (LangChain) Uses GPT-4o-mini to infer UTM values (e.g., utmsource, utmmedium, utm_campaign) Normalizes short forms like "IG" to "instagram" Follows UTM naming conventions (e.g., lowercase, underscore-separated) π Information Extractor Pulls cleanly structured UTM data from the AI response to prep for Bitly. π Bitly Tool Node Generates a short link using the inferred target URL + UTM values. π Google Sheets Logger Automatically appends the full details (Bitly link, UTM parameters, campaign owner) to a Google Sheet for easy access. π’ Slack Response Replies in-thread with the new Bitly link and campaign details, formatted clearly for the user. π Error Handling If Bitly link generation fails, the workflow gracefully stops with an error message. π§ Tools & Services Used Slack (Trigger + Response) LangChain AI Agent (with GPT-4o-mini) Bitly (via Bitly Tool Node) Google Sheets (auto-log generated links) OpenAI GPT-4o-mini (Language model for prompt understanding) π‘ Use Cases π Instantly create UTM-tagged links for campaigns π Maintain a central Bitly + UTM link database in Google Sheets π§ Use AI to reduce manual tagging and formatting errors π€ Empower your team to request links via Slack, no forms needed β Setup Instructions Slack: Set up a Slack bot and connect it using Slack Trigger and Slack response nodes. Bitly API: Generate a Bitly access token and set up credentials in the Bitly node. OpenAI / LangChain: Connect your GPT-4o or GPT-4 API key to the OpenAI Chat Model nodes. Google Sheets: Use OAuth2 credentials to connect to your Google Sheet. Make sure the sheet has matching columns for UTM parameters (sample headers included in the node schema).
Manage Google Sheets data with GPT-4 natural language processing & calculator
Whoβs it for This template is for users who want to combine the power of AI with Google Sheets for managing and calculating data quickly. Itβs ideal for small businesses, data entry teams, and anyone who tracks lists, orders, or tasks in Google Sheets and needs AI-driven insights or calculations. How it works The workflow connects an AI agent with Google Sheets and a calculator tool. When a user sends a chat message, the AI interprets the request, retrieves or updates rows in the connected sheet, and performs calculations when needed. For example, it can read a list of orders from a sheet and calculate totals or averages instantly. It also supports creating, updating, and deleting rows from the sheet through natural language instructions. How to set up Copy the provided Google Sheet into your Google Drive. Connect your Google Sheets credentials in n8n. Add your OpenAI credentials for the AI agent. Deploy the workflow and start interacting with it by sending chat prompts. Requirements OpenAI account (for AI responses) Google Sheets account with a spreadsheet n8n instance with LangChain nodes enabled How to customize the workflow Change the spreadsheet fields (ID, Name, etc.) to match your own data structure. Modify the AI prompt to guide the agentβs tone or behavior. Extend the workflow by adding more Google Sheets operations or AI tools for advanced tasks.