by Wyeth
Encode JSON to Base64 String in n8n This example workflow demonstrates how to convert a JSON object into a base64-encoded string using n8n’s built-in file processing capabilities. This is a common requirement when working with APIs, webhooks, or SaaS integrations that expect payloads to be base64-encoded. > Tip: The three green-highlighted nodes (Stringify → Convert to File → Extract from File) can be wrapped in a Subworkflow to create a reusable Base64 encoder in your own projects. 🔧 Requirements Any running n8n instance (local or cloud) No credentials or external services required What This Workflow Does Generates example JSON data Converts the JSON to a string Saves the string as a binary file Extracts the file’s contents as a base64 string Outputs the base64 string on the final node Step-by-Step Setup Manual Trigger Start the workflow using the Manual Execution node. This is useful for testing and development. Create JSON Data The Create Json Data node uses raw mode to construct a sample object with all major JSON types: strings, numbers, booleans, nulls, arrays, nested objects, etc. Convert to String The Convert to String node uses the expression ={{ JSON.stringify($json) }} to flatten the object into a single string field named json_text. Convert to File The Convert to File node takes the json_text value and saves it to a UTF-8 encoded binary file in the property encoded_text. Extract from File This node takes the binary file and extracts its contents as a base64-encoded string. The result is saved in the base64_text field. Customization Tips Replace the sample JSON in the Create Json Data node with your own payload structure. To make this reusable, extract the three core nodes into a Subworkflow or wrap them in a custom Function. Use the base64_text output field to post to APIs, store in databases, or include in webhook responses.
by Femi Ad
Google Sheets to MailChimp Auto-Importer Overview This n8n workflow automatically imports contacts from Google Sheets into your MailChimp mailing list. Perfect for businesses collecting leads through Google Forms, event registrations, or maintaining contact lists in spreadsheets. Key Features 📊 Bulk Import: Process entire Google Sheets at once 🔄 Smart Name Parsing: Automatically splits full names into first and last names 📱 Phone Number Support: Includes phone numbers as merge fields ⚡ Error Resilience: Continues processing even if individual contacts fail 📝 Import Summary: Generates a summary of processed contacts Prerequisites Before using this workflow, ensure you have: An active n8n instance (self-hosted or cloud) A Google account with access to Google Sheets A MailChimp account with at least one audience/list created Basic understanding of n8n workflows Initial Setup Step 1: Import the Workflow Copy the workflow JSON In n8n, click "Import from File" or paste the JSON Save the workflow with a meaningful name Step 2: Configure Google Sheets Connection Click on the "Get Google Sheet Data" node Click on "Credential to connect with" Select "Create New" and choose "Google Sheets OAuth2" Follow the OAuth flow to authenticate your Google account Save the credentials Step 3: Configure MailChimp Connection Click on the "Add to MailChimp" node Click on "Credential to connect with" Select "Create New" and choose "MailChimp OAuth2" or "MailChimp API" For API method: Log into MailChimp Go to Account → Extras → API keys Generate a new API key Copy and paste it into n8n Save the credentials Step 4: Configure Your Specific Settings Google Sheets Settings: Open the "Get Google Sheet Data" node Replace YOUR_GOOGLE_SHEET_ID with your actual sheet ID Find this in your Google Sheets URL: https://docs.google.com/spreadsheets/d/[SHEET_ID]/edit Replace YOUR_SHEET_NAME with your worksheet name (e.g., "Sheet1" or "Form Responses 1") MailChimp Settings: Open the "Add to MailChimp" node Replace YOUR_MAILCHIMP_LIST_ID with your audience ID Find this in MailChimp: Audience → Settings → Audience name and defaults Verify the status is set to "subscribed" Google Sheets Format Requirements Your Google Sheet must have the following columns (exact names): Names**: Full name of the contact (e.g., "John Doe") Email address**: Valid email address Phone Number**: Contact phone number (optional) Example: | Names | Email address | Phone Number | |-------|--------------|--------------| | John Doe | john@example.com | +1234567890 | | Jane Smith | jane@example.com | +0987654321 | How to Use Manual Execution: Open the workflow in n8n Click "Execute Workflow" Monitor the execution progress Check the output of "Create Import Summary" for results Scheduling (Optional): To run this automatically: Replace the "Manual Trigger" node with a "Schedule Trigger" node Set your desired schedule (e.g., daily at 9 AM) Activate the workflow Customization Options Adding More Fields: To include additional fields like company name or address: Add columns to your Google Sheet Modify the "Edit Fields" node to include new fields Update the "Format Subscriber Data" code to map new fields Add corresponding merge fields in the MailChimp node Handling Duplicates: The workflow uses "continueRegularOutput" error handling, which means: Existing subscribers will be skipped New subscribers will be added The workflow continues processing Adding Email Notifications: To receive import summaries via email: Add a Gmail or Email node after "Create Import Summary" Configure with your email settings Use the import summary data in the email body Troubleshooting Common Issues: "Invalid API Key" (MailChimp) Verify your API key is correct Check that your MailChimp account is active "Sheet not found" (Google Sheets) Verify the sheet ID is correct Ensure the service account has access to the sheet "Email already exists" errors This is normal for existing subscribers The workflow will continue processing other contacts Missing data in MailChimp Check that column names match exactly (case-sensitive) Verify data exists in the Google Sheet Best Practices Test First: Always test with a small dataset first Backup Data: Export your MailChimp list before large imports Clean Data: Ensure email addresses are valid before importing Monitor Regularly: Check import summaries for any issues Respect Privacy: Only import contacts who have consented to receive emails Support For issues specific to: n8n platform: Visit n8n Community Forum Google Sheets API: Check Google Developers Documentation MailChimp API: See MailChimp API Documentation Need help customizing? Contact me for consulting and support or add me on LinkedIn - https://www.linkedin.com/in/femi-adedayo-h44/ License This workflow template is provided free for personal and commercial use. Feel free to modify and share!
by John Alejandro SIlva
🤖🥗 Telegram Nutrition AI Assistant (Alternative to Cal AI App) > AI-powered nutrition assistant for Telegram — log meals, set goals, and get personalized daily reports with Google Sheets integration. 📋 Description This n8n template creates a Telegram-based Nutrition AI Assistant 🥑🔥 designed as an open-source alternative to the Cal AI mobile app. It allows users to interact with an AI agent via text, voice, or images to track meals, calculate macros, and monitor nutrition goals directly from Telegram. The system integrates Google Sheets as the database, handling both user profiles and meal logs, while leveraging Gemini AI for natural conversation, food recognition, and daily progress reports. ✨ Key Features 💬 Multi-input support: Text, voice messages (transcribed), and food images (AI analysis). 📊 Macro calculation: Automatic estimation of calories, proteins, carbs, and fats. 📝 User-friendly registration: Simple onboarding without storing personal health data (no weight/height required). 🎯 Goal tracking: Users can set and update calorie and protein targets. 📈 Daily reports: Personalized progress messages with visual progress bars. 🗂 Google Sheets integration: Profile table for user targets. Meals table for food logs. 🔄 Advanced n8n nodes: Includes use of Merge, Subworkflow, and Code nodes for data processing and report generation. 💡 Acknowledgment Inspired by the Cal AI concept 💡 — this template demonstrates how to reproduce its main functionality with n8n, Telegram, and AI agents as a flexible, open-source automation workflow. 🏷 Tags telegram ai-assistant nutrition meal-tracking google-sheets food-logging voice-transcription image-analysis daily-reports n8n-template merge-node subworkflow-node code-node telegram-trigger google-gemini 💼 Use Case Use this template if you want to: 🥗 Log meals using text, images, or voice messages. 📊 Track nutrition goals (calories, proteins) with daily progress updates. 🤖 Provide a chat-based nutrition assistant without building a full app. 🗂 Store structured nutrition data in Google Sheets for easy access and analysis. 💬 Example User Interactions 📸 User sends a photo of a meal → AI analyzes the food and logs calories/macros. 🎤 User sends a voice message → AI transcribes and logs the meal. ⌨️ User types “report” → AI returns a daily nutrition summary with progress bars. 🥅 User says “update my protein goal” → AI updates profile in Google Sheets. 🔑 Required Credentials Telegram Bot API (Bot Token) Google Sheets API credentials AI Provider API (Google Gemini or compatible LLM) ⚙️ Setup Instructions 🗂 Create two Google Sheets tables: Profile: User_ID, Name, Calories_target, Protein_target Meals: User_ID, Date, Meal_description, Calories, Proteins, Carbs, Fats 🔌 Configure the Telegram Trigger with your bot token. 🤖 Connect your AI provider credentials (Gemini recommended). 📑 Connect Google Sheets with your credentials. ▶️ Deploy the workflow in n8n. 🎯 Start interacting with your nutrition assistant via Telegram. 📌 Extra Notes 🟩 Green section: Handles Telegram trigger and user check. 🟥 Red section: Registers new users and sets goals. 🟦 Blue section: Processes text, voice, and images. 🟨 Yellow section: Generates nutrition reports. 🟪 Purple section: Main AI agent controlling tools and logic. 💡 Need Assistance? If you’d like help customizing or extending this workflow, feel free to reach out: 📧 Email: johnsilva11031@gmail.com 🔗 LinkedIn: John Alejandro Silva Rodríguez
by Yaron Been
Workflow Overview This cutting-edge n8n automation is a sophisticated market research and intelligence gathering tool designed to transform web content discovery into actionable insights. By intelligently combining web crawling, AI-powered filtering, and smart summarization, this workflow: Discovers Relevant Content: Automatically crawls target websites Identifies trending topics Extracts comprehensive article details Intelligent Content Filtering: Applies custom keyword matching Filters for most relevant articles Ensures high-quality information capture AI-Powered Summarization: Generates concise, meaningful summaries Extracts key insights Provides quick, digestible information Seamless Delivery: Sends summaries directly to Slack Enables instant team communication Facilitates rapid information sharing Key Benefits 🤖 Full Automation: Continuous market intelligence 💡 Smart Filtering: Precision content discovery 📊 AI-Powered Insights: Intelligent summarization 🚀 Instant Delivery: Real-time team updates Workflow Architecture 🔹 Stage 1: Content Discovery Scheduled Trigger**: Daily market research FireCrawl Integration**: Web content crawling Comprehensive Site Scanning**: Extracts article metadata Captures full article content Identifies key information sources 🔹 Stage 2: Intelligent Filtering Keyword-Based Matching** Relevance Assessment** Custom Domain Optimization**: AI and technology focus Startup and innovation tracking 🔹 Stage 3: AI Summarization OpenAI GPT Integration** Contextual Understanding** Concise Insight Generation**: 3-point summary format Captures essential information 🔹 Stage 4: Team Notification Slack Integration** Instant Information Sharing** Formatted Insight Delivery** Potential Use Cases Market Research Teams**: Trend tracking Innovation Departments**: Technology monitoring Startup Ecosystems**: Competitive intelligence Product Management**: Industry insights Strategic Planning**: Rapid information gathering Setup Requirements FireCrawl API Web crawling credentials Configured crawling parameters OpenAI API GPT model access Summarization configuration API key management Slack Workspace Channel for insights delivery Appropriate app permissions Webhook configuration n8n Installation Cloud or self-hosted instance Workflow configuration API credential management Future Enhancement Suggestions 🤖 Multi-source crawling 📊 Advanced sentiment analysis 🔔 Customizable alert mechanisms 🌐 Expanded topic tracking 🧠 Machine learning refinement Technical Considerations Implement robust error handling Use exponential backoff for API calls Maintain flexible crawling strategies Ensure compliance with website terms of service Ethical Guidelines Respect content creator rights Use data for legitimate research Maintain transparent information gathering Provide proper attribution Workflow Visualization [Daily Trigger] ⬇️ [Web Crawling] ⬇️ [Content Filtering] ⬇️ [AI Summarization] ⬇️ [Slack Delivery] Connect With Me Ready to revolutionize your market research? 📧 Email: Yaron@nofluff.online 🎥 YouTube: @YaronBeen 💼 LinkedIn: Yaron Been Transform your information gathering with intelligent, automated workflows! #AIResearch #MarketIntelligence #AutomatedInsights #TechTrends #WebCrawling #AIMarketing #InnovationTracking #BusinessIntelligence #DataAutomation #TechNews
by Agent Studio
This workflow is a experiment to build HTML pages from a user input using the new Structured Output from OpenAI. How it works: Users add what they want to build as a query parameter The OpenAI node generate an interface following a structured output defined in the body The JSON output is then converted to HTML along with a title The HTML is encapsulated in an HTML node (where the Tailwind css script is added) The HTML is rendered to the user via the Webhook response. Set up steps Create an OpenAI API Key Create the OpenAI credentials Use the credentials for both nodes HTTP Request (as Predefined Credential type) and OpenAI Activate your workflow Once active, go to the production URL and add what you'd like to build as the parameter "query" Example: https://production_url.com?query=a%20signup%20form Example of generated page
by Yaron Been
🚀 Automated Investor Intelligence: CrunchBase to Google Sheets Data Harvester! Workflow Overview This cutting-edge n8n automation is a sophisticated investor intelligence tool designed to transform market research into actionable insights. By intelligently connecting CrunchBase, data processing, and Google Sheets, this workflow: Discovers Investor Insights: Automatically retrieves latest investor data Tracks key investment organizations Eliminates manual market research efforts Intelligent Data Processing: Filters investor-specific organizations Extracts critical investment metrics Ensures comprehensive market intelligence Seamless Data Logging: Automatically updates Google Sheets Creates real-time investor database Enables rapid market trend analysis Scheduled Intelligence Gathering: Daily automated tracking Consistent investor insight updates Zero manual intervention required Key Benefits 🤖 Full Automation: Zero-touch investor research 💡 Smart Filtering: Targeted investment insights 📊 Comprehensive Tracking: Detailed investor intelligence 🌐 Multi-Source Synchronization: Seamless data flow Workflow Architecture 🔹 Stage 1: Investor Discovery Scheduled Trigger**: Daily market scanning CrunchBase API Integration** Intelligent Filtering**: Investor-specific organizations Key investment metrics Most recent data 🔹 Stage 2: Data Extraction Comprehensive Metadata Parsing** Key Information Retrieval** Structured Data Preparation** 🔹 Stage 3: Data Logging Google Sheets Integration** Automatic Row Appending** Real-Time Database Updates** Potential Use Cases Venture Capitalists**: Investment ecosystem mapping Startup Scouts**: Investor trend analysis Market Researchers**: Comprehensive investment insights Business Development**: Strategic partnership identification Investment Analysts**: Market intelligence gathering Setup Requirements CrunchBase API API credentials Configured access permissions Investor organization tracking setup Google Sheets Connected Google account Prepared tracking spreadsheet Appropriate sharing settings n8n Installation Cloud or self-hosted instance Workflow configuration API credential management Future Enhancement Suggestions 🤖 Advanced investment trend analysis 📊 Multi-source investor aggregation 🔔 Customizable alert mechanisms 🌐 Expanded investment stage tracking 🧠 Machine learning insights generation Technical Considerations Implement robust error handling Use secure API authentication Maintain flexible data processing Ensure compliance with API usage guidelines Ethical Guidelines Respect business privacy Use data for legitimate research Maintain transparent information gathering Provide proper attribution Hashtag Performance Boost 🚀 #InvestorIntelligence #VentureCapital #MarketResearch #AIWorkflow #DataAutomation #StartupEcosystem #InvestmentTracking #BusinessIntelligence #TechInnovation #StartupFunding Workflow Visualization [Daily Trigger] ⬇️ [Fetch Investor Data] ⬇️ [Extract Investor Fields] ⬇️ [Log to Google Sheets] Connect With Me Ready to revolutionize your investor research? 📧 Email: Yaron@nofluff.online 🎥 YouTube: @YaronBeen 💼 LinkedIn: Yaron Been Transform your market intelligence with intelligent, automated workflows!
by Yaron Been
Transform raw customer feedback into powerful testimonial quotes automatically. This intelligent workflow monitors feedback forms, uses AI to identify and extract the most emotionally engaging testimonial content, and organizes everything into a searchable database for your marketing campaigns - turning every piece of customer feedback into potential marketing assets. 🚀 What It Does Smart Feedback Monitoring: Automatically detects new customer feedback submissions from Google Forms and triggers testimonial extraction within minutes. AI-Powered Quote Extraction: Uses Google Gemini to analyze feedback and extract short, emotionally engaging testimonial quotes while filtering out neutral or irrelevant content. Marketing-Ready Output: Focuses on impactful phrases and statements that work perfectly for websites, social media, ads, and sales materials. Automated Database Building: Creates and maintains a searchable testimonial library in Google Sheets with customer details and extracted quotes. Instant Team Notifications: Sends immediate email alerts to your marketing team with new testimonials, ensuring no valuable social proof goes unused. 🎯 Key Benefits ✅ Never Miss Marketing Gold: Automatically extract value from every feedback submission ✅ Save 8+ Hours Weekly: Eliminate manual review of feedback for testimonials ✅ Build Social Proof Library: Create searchable database of customer quotes ✅ Boost Conversion Rates: Use authentic testimonials across marketing campaigns ✅ Identify Happy Customers: Spot satisfied clients for case studies and referrals ✅ Scale Content Creation: Generate testimonials faster than customers submit feedback 🏢 Perfect For Businesses Needing Social Proof E-commerce stores showcasing product satisfaction SaaS companies highlighting user success stories Service businesses building trust and credibility Coaches and consultants demonstrating client results Marketing Applications Website Content**: Populate testimonial sections automatically Social Media**: Create quote posts and success story content Sales Materials**: Include powerful customer quotes in proposals Email Marketing**: Add authentic testimonials to campaigns ⚙️ What's Included Complete Workflow Setup: Ready-to-deploy n8n workflow with all integrations configured Google Forms Integration: Automatically processes new feedback submissions AI Quote Extraction: Google Gemini identifies most impactful testimonial content Database Management: Organized Google Sheets storage with customer information Team Notifications: Instant email alerts to marketing team members Setup Documentation: Complete configuration and customization guide 🔧 Technical Requirements n8n Platform**: Cloud or self-hosted instance Google Workspace**: For Forms, Sheets, and Gmail integration Google Gemini API**: For AI-powered testimonial extraction (free tier available) Customer Feedback**: Existing or new feedback collection process 📊 Before & After Examples Before (Raw Customer Feedback): "I was really struggling with managing my team's projects and keeping track of all the deadlines. Everything was scattered across different tools and I was spending way too much time just trying to figure out what everyone was working on. Since we started using your project management software about 6 months ago, it's been a complete game changer. Now I can see everything at a glance, our team communication has improved dramatically, and we're actually finishing projects ahead of schedule. The reporting features are amazing too - I can finally show my boss concrete data about our team's productivity. I honestly don't know how we managed without it. The customer support team has been fantastic as well, always quick to help when we had questions during setup." After (AI Extracted Testimonial): "Complete game changer - now I can see everything at a glance, our team communication has improved dramatically, and we're actually finishing projects ahead of schedule." Healthcare Example: Raw Feedback: "I had been dealing with chronic back pain for over 3 years and had tried everything - physical therapy, medication, different doctors. Nothing seemed to help long-term. When I found Dr. Martinez, I was honestly pretty skeptical because I'd been disappointed so many times before. But after our first consultation, I felt hopeful for the first time in years. She really listened to me and explained everything clearly. The treatment plan she developed was comprehensive but manageable. Within just 2 months, I was experiencing significant pain reduction, and now after 6 months, I'm practically pain-free. I can play with my kids again, sleep through the night, and even started hiking on weekends. Dr. Martinez didn't just treat my symptoms - she helped me get my life back." Extracted Testimonial: "Within just 2 months, I was experiencing significant pain reduction, and now I'm practically pain-free. Dr. Martinez didn't just treat my symptoms - she helped me get my life back." 🎨 Customization Options Industry-Specific Extraction: Tailor AI prompts for healthcare, technology, finance, retail terminology Quote Length Control: Adjust extraction for short punchy quotes vs longer detailed testimonials Sentiment Targeting: Focus on specific emotions like excitement, relief, satisfaction, transformation Multi-Channel Forms: Connect multiple feedback sources to one testimonial database Approval Workflows: Add human review step before testimonials go live CRM Integration: Connect extracted testimonials to customer records 🔄 How It Works Customer submits feedback via your Google Form Workflow detects new submission within 1 minute automatically AI analyzes feedback content to identify most impactful statements Testimonial quote is extracted and formatted for marketing use Quote is saved to database with customer details and timestamp Marketing team receives email with new testimonial content 💡 Use Case Examples SaaS Company: Automatically extract user success quotes from feature feedback surveys for website testimonials E-commerce Store: Turn product review submissions into powerful testimonial quotes for product pages and ads Healthcare Practice: Extract patient satisfaction quotes from feedback forms for website and marketing materials Consulting Firm: Convert client project feedback into testimonials highlighting business transformation results 📈 Expected Results 300% increase** in testimonial collection vs manual methods 90% time savings** on testimonial creation and organization 50% improvement** in marketing content authenticity 25% boost** in conversion rates using extracted testimonials Unlimited scalability** as feedback volume grows 🛠️ Setup & Support Quick Deployment: Complete setup in 20 minutes with included guide Pre-Built Prompts: AI extraction prompts optimized for different industries Template Library: Ready-to-use feedback forms and testimonial layouts Video Tutorial: Complete walkthrough from setup to first extracted testimonial 📞 Get Help & Learn More 🎥 Free Video Tutorials YouTube Channel: https://www.youtube.com/@YaronBeen/videos Complete setup and configuration guide 💼 Professional Support LinkedIn: https://www.linkedin.com/in/yaronbeen/ Connect for testimonial marketing strategy consulting Share your social proof automation success stories Access exclusive templates for different business types 📧 Direct Support Email: Yaron@nofluff.online Technical setup assistance and customization help AI prompt optimization for your specific business Integration with existing marketing and CRM systems Response within 24 hours
by bangank36
This workflow retrieves all Squarespace Orders and saves them into a Google Sheets spreadsheet using the Squarespace Commerce API. It uses pagination to ensure all orders are collected efficiently. How It Works The workflow queries your Squarespace Orders API. It fetches data in paginated batches and inserts them into Google Sheets. The Global node is used to configure API parameters dynamically, allowing users to set date filters, pagination, and fulfillment status. The workflow runs on demand or on a schedule, ensuring your data stays up to date. Parameters This workflow allows you to customize the API request using the Global node settings: api-version** (string, required) – The current API version (see Squarespace Orders API documentation). modifiedAfter**={a-datetime} (string, conditional) – Fetch orders modified after a specific date (ISO 8601 format). modifiedBefore**={b-datetime} (string, conditional) – Fetch orders modified before a specific date (ISO 8601 format). cursor**={c} (string, conditional) – Used for pagination, cannot be combined with other filters. fulfillmentStatus**={status} (optional, enum) – Filter by fulfillment status: PENDING, FULFILLED, or CANCELED. maxPage** – Set -1 to enables infinite pagination to fetch all available orders. Requirements Credentials To use this workflow, you need: Squarespace API Key – Retrieve from your Squarespace settings. Google Sheets API credentials – Required to insert data into a spreadsheet. Google Sheets Setup Use the Squarespace order export feature to create a reference sheet. Google Sheets template is available Who Is This For? This workflow is designed for: Squarespace store owners exporting orders for tax reports, analytics, or sales tracking. Businesses automating order data retrieval for external reporting. Anyone needing an efficient way to extract Squarespace order data without manual effort. Explore More Templates Get all orders in Shopify to Google Sheets Sync Shopify customers to Google Sheets + Squarespace compatible csv 👉 Check out my other n8n templates
by David Olusola
This workflow analyzes images submitted via a form using OpenAI Vision, then delivers the analysis result directly to your Telegram chat. ✅ Use case examples: • Users submit screenshots for instant AI interpretation • Automated document or receipt analysis with Telegram delivery • Quick OCR or image classification workflows ⸻ ⚙️ Setup Guide Form Submission Trigger • Connect your form app (e.g. Typeform, Tally, or n8n’s own webhook form) to the On form submission trigger node. • Ensure it sends the image file or URL as input. OpenAI Vision Analysis • In the OpenAI node, select Analyze Image operation. • Provide your OpenAI API key and configure the prompt to instruct the model on what to analyze (e.g. “Describe this receipt in detail”). Set Telegram Chat ID • Use this manual node to input your Telegram Chat ID for delivery. • Alternatively, automate this with a database lookup or user session if building for multiple users. Telegram Delivery Node • Connect your Telegram Bot to n8n using your bot token. • Set up the sendMessage operation, using the analysis result from the previous node as the message text. Testing • Click Execute workflow. • Submit an image via your form and confirm it delivers to your Telegram as expected.
by Aji Prakoso
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This workflow provides a complete, ready-to-use template for a Retrieval-Augmented Generation (RAG) system. It allows you to build a powerful AI chatbot that can answer questions based on the content of PDF documents you provide, using a modern and powerful stack for optimal performance. Good to know Costs:** This workflow uses paid services (OpenAI, Pinecone, Cohere). Costs will be incurred based on your usage. Please review the pricing pages for each service to understand the potential expenses. Video Tutorial (Bahasa Indonesia):** For a step-by-step guide on how this workflow functions, you can watch the accompanying video tutorial here: N8N Tutorial: Membangun Chatbot RAG dengan Pinecone, OpenAI, & Cohere How it works This workflow operates in two distinct stages: 1. Data Ingestion & Indexing: It begins when a .pdf file is uploaded via the n8n Form Trigger. The Default Data Loader node processes the PDF, and the Recursive Character Text Splitter breaks down the content into smaller, manageable chunks. The Embeddings OpenAI node converts these text chunks into vector embeddings (numerical representations). Finally, the Pinecone Vector Store node takes these embeddings and stores (upserts) them into your specified Pinecone index, creating a searchable knowledge base. 2. Conversational AI Agent: A user sends a message through the Chat Trigger. The AI Agent receives the message and uses its VectorDB tool to search the Pinecone index for relevant information. The Reranker Cohere node refines these search results, ensuring only the most relevant context is selected. The user's original question and the refined context are sent to the OpenAI Chat Model (gpt-4.1), which generates a helpful, context-aware answer. The Simple Memory node maintains conversation history, allowing for natural, multi-turn dialogues. How to use Using this workflow is a two-step process: Populate the Knowledge Base: First, you need to add documents. Trigger the workflow by using the Form Trigger and uploading a PDF file. Wait for the execution to complete. You can do this for multiple documents. Start Chatting: Once your data has been ingested, open the Chat Trigger's interface and start asking questions related to the content of your uploaded documents. The Form Trigger is just an example. Feel free to replace it with other triggers, such as a node that watches a Google Drive or Dropbox folder for new files. Requirements To run this workflow, you will need active accounts and API keys for the following services. OpenAI Account & API Key:** Function: Powers text embedding and the final chat generation. Required for the Embeddings OpenAI and OpenAI Chat Model nodes. Pinecone Account & API Key:** Function: Used to store and retrieve your vector knowledge base. Required for the Pinecone Vector Store and VectorDB nodes. You also need to provide your Pinecone Environment. Cohere Account & API Key:** Function: Improves the accuracy of your chatbot by re-ranking search results for relevance. Required for the Reranker Cohere node. Customising this workflow This template is a great starting point. Here are a few ways you can customize it: Change the AI Personality:* Edit the *System Message** in the AI Agent node to change the bot's behavior, tone, or instructions. Use Different Models:** You can easily swap the OpenAI model for another one (e.g., gpt-3.5-turbo for lower costs) in the OpenAI Chat Model node. Adjust Retrieval:** In the VectorDB tool node, you can modify the Top K parameter to retrieve more or fewer document chunks to use as context. Automate Ingestion:** Replace the manual Form Trigger with an automated one, like a node that triggers whenever a new file is added to a specific cloud storage folder.
by James Francis
Overview Slack quietly released an update to their API that allows developers to build "AI Apps & Agents", which is a special classification of apps that have access to several special capabilities including: Multiple simultaneous chat threads with one user Loading "three dots" UI while your agent is thinking Option for users to pin your app to their top bar for quick chat access This workflow demonstrates how to build a Slack agent that takes advantage of all of these features. For a full video walkthrough of this workflow, watch this YouTube tutorial. Setup Instructions All of the below steps are required for this workflow to function properly unless otherwise noted. Create a Slack App Visit api.slack.com and click "Your Apps" Create a new app from scratch and follow the setup instructions In the Agents & AI Apps tab, enable the toggle and give your app a brief description In the OAuth & Permissions tab, enable the following bot token scopes: assistant:write chat:write channels:read im:history Install the app into your workspace and grant the requested permissions In your Slack workspace, right click your app's name in the sidebar, click "View app details", and make note of your apps Channel ID - you'll need this later. Copy your app's Bot User OAuth Token - you'll need that to create your n8n credentials In the Event Subscriptions tab, enable events and paste the workflows PRODUCTION webhook url (from this workflow's trigger node) into the input. In the same tab under "Susbcribe to bot events", select message.im Create a Postgres database In order to save the chat history and give your agent a working memory, you'll need your own Postgres database. You can use Supabase, Neon, or any other Postgres database provider. Once you've added your database's credentials to n8n, you can select those credentials in the Postgres Chat Memory node. This worklow saves all chat history in a table called chat_histories, but you name the table whatever you want. Create n8n Credentials You'll need to create the following credentials: Slack API. Use your Bot User OAuth Token referenced above. Bearer Auth. Use the same Bot User OAuth Token. Postgres. Use the connection string or config from your database provider. OpenRouter (or any other LLM model for the agent's model node) Wire Everything Up Now that you've created your Slack app, have your Postgres database, and have created credentials, follow these steps to wire up your workflow: In the "On Message Received" trigger, use your Slack API credential and enter your apps Channel ID in the "Channel To Watch" field. In the "Set Thinking Status" node, use your Bearer Auth credential. In the "Postgres Chat Memory" node, use your Postgres credential. In the "Send Reply" node, use your Slack API credential. Using the Chatbot Once you've completed the setup process and added in your credentials, you'll have a fully functional Slack chatbot complete with threads, loading UI, and the ability to pin your app to your workspace's top bar. Taking the Next Steps Now that this skeleton app is in place, it's up to you to add horsepower to the AI agent at the center of it all. Customize the prompts and add whatever tools you'd like. The sky is the limit! If you have any questions or feedback about this workflow, or would like me to build custom workflows for your business, email me at n8n@paperjam.agency.
by Dmytro
AI-Powered Product Assistant for E-commerce Transform your online store customer service with an intelligent AI assistant that automatically processes customer inquiries, searches your product database, and provides personalized responses about product availability, pricing, and specifications. Perfect for shoe stores, fashion retailers, and any business with extensive product catalogs - this workflow eliminates manual customer service while increasing response speed and accuracy. How it works Customer sends product inquiry via webhook (Instagram DM, website chat, or messaging app) AI extracts key product details (brand, model, size, color) from natural language text System searches your Google Sheets product database with smart filtering AI generates friendly, personalized response with availability, pricing, and stock information Automatic response sent back to customer with product details or alternatives Screenshots: Customer inquiry: "Do you have Nike Air Max 40 size?" AI response: "Nike Air Max 90, size 40 - in stock 3 pieces, price 120$" Set up steps Prepare your product database - Create Google Sheets with columns: Brand, Model, Size, Color, Price, Quantity Configure AI settings - Connect OpenAI API for natural language processing Set up webhook endpoint - Configure trigger for your messaging platform (Instagram, Telegram, website chat) Test with sample inquiries - Verify AI correctly parses requests and finds products Deploy and monitor - Launch your automated assistant and track performance Time investment: 30-45 minutes setup, works immediately with any product catalog up to 1000+ items.