by Tom
This is a workflow that might come handy after using loops. They usually leave you with items spread across different "runs". The Code node in this example workflow merges them into a single run, so you have a single list of items which is often easier to work with. Simply adjust the node name inside the Code node as needed. The idea is based on this older workflow template.
by n8n Team
This workflow generates CSV files containing a list of 10 random users with specific characteristics using OpenAI's GPT-4 model. It then splits this data into batches, converts it to CSV format, and saves it to disk for further use. The execution of the workflow begins from here when triggered manually. "OpenAI" Node. This uses the OpenAI API to generate random user data. The input to the OpenAI API is a fixed string, which asks for a list of 10 random users with some specific attributes. The attributes include a name and surname starting with the same letter, a subscription status, and a subscription date (if they are subscribed). There is also a short example of the JSON object structure. This technique is called one-shot prompting. "Split In Batches" Node. This node is used to handle the OpenAI responses one by one. "Parse JSON" Node. This node converts the content of the message received from the OpenAI node (which is in string format) into a JSON object. "Make JSON Table" Node. This node is used to convert the JSON data into a tabular format, which is easier to handle for further data processing. "Convert to CSV" Node. This node converts the table format data received from the "Make JSON Table" node into CSV format and assigns a file name. "Save to Disk" Node. This node is used to save the CSV generated in the previous node to disk in the ".n8n" directory. The workflow is designed in a circular manner. So, after saving the file to disk, it goes back to the "Split In Batches" node to process the OpenAI output, until all batches are processed.
by AlQaisi
Transforming Emails into Podcasts 🎙️ Check out this channel for example. The n8n workflow described here aims to revolutionize the way users engage with promotional emails by converting them into entertaining audio podcasts. This innovative project leverages automation through n8n to streamline tasks and enhance user experience. Project Benefit 🎧🌟 The primary goal of this project is to transform "CATEGORY_PROMOTIONS" emails into engaging audio content. By converting text into speech, users can enjoy promotional material hands-free, making it easier to consume information while on the go or relaxing. The workflow consists of several key steps orchestrated seamlessly to deliver a delightful experience to users. How to Use the Workflow: Gmail trigger Node: Initiates the workflow by fetching "CATEGORY_PROMOTIONS" emails at regular intervals. The Gmail Trigger node in your N8N workflow is set to poll for new emails every minute and is configured to filter emails with the label "CATEGORY_PROMOTIONS" before triggering the workflow. Steps to Use Filters Inside the Gmail Trigger Node: Configure Gmail Trigger Node: Set "Poll Times" to "Every Minute" to check for new emails at regular intervals. Enable the "Simple" toggle if you want to simplify the node interface. Under "Filters", specify the label IDs you want to filter by. In this case, it's set to "CATEGORY_PROMOTIONS". Adjust any additional options as needed. // Configure Gmail Trigger node pollTimes: { item: [ { mode: "everyMinute" } ] }, simple: false, filters: { labelIds: [ "CATEGORY_PROMOTIONS" ] }, options: {} Save and Execute: Save your workflow and execute it to start monitoring your Gmail account for new emails with the specified label filter. By following these steps, your workflow will effectively trigger based on new emails that match the "CATEGORY_PROMOTIONS" label in your Gmail account. Get message content Node: Extracts the email content for processing. Summarization Chain Node: Generates concise summaries using advanced methods for better readability. Delete the unnecessary items Node: Removes irrelevant details from the email content. Text to Free TTS Node: Converts the summary text into speech using Free TTS technology. Convert from base64 to File Node: Transforms the audio data into a compatible file format. Merge Text with Audio Node: Combines the text and audio components seamlessly. Aggregate in same cell Node: Gathers all processed data for finalization. Send Message to Telegram Node: Dispatches the audio message along with a caption to a designated Telegram chat ID. By automating these tasks, the workflow ensures efficient communication and delivers content in a more engaging format, fostering a positive user experience. Configuration Instructions: The configuration of this workflow involves setting up the necessary nodes and establishing connections between them. Each node performs a specific function crucial to the overall operation of the workflow. Additionally, credentials need to be provided for accessing Gmail and OpenAI services to enable seamless data processing and summarization. Utilizing Text-to-Speech API 🎧 In addition to n8n automation, an external Text-to-Speech API plays a pivotal role in generating audio content from text data. By sending a POST request with JSON data containing the text and voice preferences, users can quickly receive audio files of the converted content. The API offers a straightforward interface for text-to-speech conversion, making it ideal for creating audio clips efficiently. To access this API, simply submit the desired text and voice selection to receive the generated speech audio file. The API endpoint can be accessed at https://tiktok-tts.weilnet.workers.dev/api/generation or through https://tiktokvoicegenerator.com/. In conclusion, this n8n workflow coupled with a Text-to-Speech API presents a powerful solution for transforming emails into captivating podcasts, enhancing user engagement and communication effectiveness. By embracing automation and innovative technologies, this project aims to improve user experience and streamline content delivery processes. 🌈✨🚀
by David Roberts
OpenAI Assistant is a powerful tool, but at the time of writing it doesn't automatically remember past messages from a conversation. This workflow demonstrates how to get around this, by managing the chat history in n8n and passing it to the assistant when required. This makes it possible to use OpenAI Assistant for chatbot use cases. Note that to use this template, you need to be on n8n version 1.28.0 or later.
by Joseph LePage
The 🌐🤖 AI Agent Chatbot with Jina.ai Webpage Scraper workflow is a powerful automation designed to integrate real-time web scraping capabilities into an AI-driven chatbot. Here's how it works and why it's important: How It Works 💬 Chat Trigger: The workflow begins when a user sends a chat message, triggering the "When chat message received" node. 🧠 AI Agent Processing: The input is passed to the "Jina.ai Web Scraping Agent," which uses advanced AI logic to interpret the user’s query and determine the information needed. 🌐 Web Scraping: The agent utilizes the "HTTP Request" node to scrape real-time data from a user-provided URL, enabling the chatbot to fetch and analyze live website content. 🗂️ Memory Management: The "Window Buffer Memory" node ensures context retention by storing and managing conversational history, allowing for seamless interactions. 🤖 Language Model Integration: The scraped data is processed using the "gpt-4o-mini" language model, which generates clear, accurate, and contextually relevant responses for the user. Why It's Cool ⏱️ Real-Time Information Retrieval**: This workflow empowers users to access up-to-date web content directly through a chatbot, eliminating manual web searches. ✨ Enhanced User Experience**: By combining web scraping with conversational AI, it delivers precise answers tailored to user queries in real time. 🔄 Versatility**: It can be applied across various domains, such as customer support, research, or data analysis, making it a valuable tool for businesses and individuals alike. ⚙️ Automation Efficiency**: Automating web scraping and response generation saves time and effort while ensuring accuracy.
by Yaron Been
Dessix Moss Ttsd Text Generator Description MOSS-TTSD (text to spoken dialogue) is an open-source bilingual spoken dialogue synthesis model that supports both Chinese and English. It can transform dialogue scripts between two speakers into natural, expressive conversational speech. Overview This n8n workflow integrates with the Replicate API to use the dessix/moss-ttsd model. This powerful AI model can generate high-quality text content based on your inputs. Features Easy integration with Replicate API Automated status checking and result retrieval Support for all model parameters Error handling and retry logic Clean output formatting Parameters Optional Parameters seed** (integer, default: 42): Random seed for reproducibility text** (string, default: [S1]你好[S2]你好,最近怎么样[S1]还不错,你呢[S2]我也挺好的,谢谢关心): Dialogue text, format: [S1]Speaker 1 content[S2]Speaker 2 content[S1]... use_normalize** (boolean, default: True): Whether to use text normalization (recommended for better handling of numbers, punctuation, etc.) reference_text_speaker1** (string, default: 周一到周五每天早晨七点半到九点半的直播片段,言下之意呢就是废话有点多,大家也别嫌弃,因为这都是直播间最真实的状态了): Reference text for speaker 1 (corresponding to reference audio) reference_text_speaker2** (string, default: 如果大家想听到更丰富更及时的直播内容,记得在周一到周五准时进入直播间,和大家一起畅聊新消费新科技新趋势): Reference text for speaker 2 (corresponding to reference audio) reference_audio_speaker1** (string, default: None): Reference audio file for speaker 1 (optional, for voice cloning) reference_audio_speaker2** (string, default: None): 说话者2的参考音频文件(可选,用于声音克隆)/ Reference audio file for speaker 2 (optional, for voice cloning) How to Use Set up your Replicate API key in the workflow Configure the required parameters for your use case Run the workflow to generate text content Access the generated output from the final node API Reference Model: dessix/moss-ttsd API Endpoint: https://api.replicate.com/v1/predictions Requirements Replicate API key n8n instance Basic understanding of text generation parameters
by Irfan Handoko
Pizza Ordering Chatbot with OpenAI - Menu, Orders & Status Tracking Introduction This workflow template is designed to automate order processing for a pizza store using OpenAI and n8n. The chatbot acts as a virtual assistant to handle customer inquiries related to menu details, order placement, and order status tracking. Features The chatbot provides an interactive experience for customers by performing the following functions: Menu Inquiry: When a customer asks about the menu, the chatbot responds with a list of available pizzas, prices, and additional options. Order Placement: If a customer places an order, the chatbot confirms order details, provides a summary, informs the customer that the order is being processed, and expresses gratitude. Order Status Tracking: If a customer asks about their order status, the chatbot retrieves details such as order date, pizza type, and quantity, providing real-time updates. Prerequisites Before setting up the workflow, ensure you have the following: OpenAI account** (Sign up here) OpenAI API key** to interact with GPT-3.5 n8n instance** running locally or on a server (Installation Guide) Configuration Steps Step 1: Set Up OpenAI API Credentials Log in to OpenAI's website. Navigate to API Keys under your account settings. Click Create API Key and copy the key for later use. Step 2: Configure OpenAI Node in n8n Open n8n and create a new workflow. Click Add Node and search for OpenAI. Select OpenAI from the list. In the OpenAI node settings, click "Create New" under the Credentials section. Enter a name for the credentials (e.g., "PizzaBot OpenAI Key"). Paste your API Key into the field. Click Save. Step 3: Set Up the Chatbot Logic Connect the AI Agent Builder Node to the OpenAI Node and HTTP Request Node. Configure the OpenAI Node with the following settings: Model: gpt-3.5-turbo Prompt: Provide dynamic text based on customer inquiries (e.g., "List available pizzas," "Place an order for Margherita pizza," "Check my order status"). Temperature: Adjust based on desired creativity (recommended: 0.7). Max Tokens: Limit response length (recommended: 150). Add multiple HTTP Request Node: For Get Products: Fetch stored menu data and return details. For Order Product: Capture order details, generate an order ID, and confirm with the customer. For Get Order: Retrieve order details based on the order ID and display progress. Step 4: Testing and Deployment Click Execute Workflow to test the chatbot. Open the Chat Message node, then copy the chat URL to access the chatbot in your browser. Interact with the chatbot by asking different queries (e.g., "What pizzas do you have?" or "I want to order a Pepperoni pizza"). Verify responses and adjust prompts or configurations as needed. Deploy the workflow and integrate it with a messaging platform (e.g., Telegram, WhatsApp, or a website chatbot). Conclusion This n8n workflow enables a fully functional pizza ordering chatbot using OpenAI's GPT-3.5. Customers can view menus, place orders, and track their order status efficiently. You can further customize the chatbot by refining prompts, adding new features, or integrating with external databases for order management. 🚀 Happy automating!
by ozkary
Welcome to Ozki Your Data Analyst Agent V1. The Ozki Data Analyst Agent is designed to analyze data from Google Sheets. To use it, you'll need to provide the URL of your Google Sheet file. The agent will then process the data and provide you with analysis results, including key performance indicators (KPIs). Configuration: Configure your credentials on the OpenAI model or select the n8n free OpenAI credits. Set up your agent memory. Use Simple Memory as default. Set your credentials to Google Sheets. Log in with the Google Sheet tool. Instructions: Start with a "Hi" to get the instructions. Ozki needs your Google Sheet URL, which you can get from the address bar of your browser when you have the file open. Follow the conversation with Ozki for your data analysis results.
by Davide
How many times have you missed a meeting or forgotten an appointment because a calendar reminder got lost in the noise? Traditional notifications are often dry, easy to ignore, or scattered across different apps—leaving you scrambling at the last minute. This smart Google Calendar workflow fixes that by sending you a clear, friendly reminder exactly 1 hour before your event starts—delivered through Telegram as if a personal assistant were looking out for you. Powered by AI, it transforms cold calendar alerts into warm, conversational nudges you won't ignore. Why This Works Better: ✅ No More Overlooked Alerts – Consolidates reminders into one clear, accessible place (Telegram), so you never miss them. ✅ Friendly & Engaging – AI transforms robotic calendar entries into natural, human-like reminders that are harder to ignore. ✅ Works Everywhere – Whether you're on your phone, laptop, or tablet, you’ll get the same clear notification, no matter the platform. How It Works Scheduled Trigger: The workflow starts with a Schedule Trigger node that runs every minute to check for upcoming events. Google Calendar Check: The "Get upcoming event" node queries Google Calendar for events starting within the next hour (between timeMin and timeMax). Duplicate Prevention: The "Already sent?" node ensures reminders are not sent multiple times for the same event by filtering out duplicates. AI-Powered Reminder: The "Secretary Agent" node, powered by GPT-4, crafts a friendly and professional reminder message. It includes event details like name, description, location, start/end time, and creator, formatted in a conversational tone. Telegram Notification: The final "Send reminder" node delivers the reminder via Telegram, ensuring the user receives it in a clear and accessible format. Set Up Steps Configure Schedule Trigger: Set the interval (e.g., every minute) to check for events. Connect Google Calendar: Link your Google Calendar account and specify the calendar to monitor. Set Up AI Agent: Customize the "Secretary Agent" with the provided system message to ensure reminders are warm, professional, and detailed. Link Telegram: Add your Telegram credentials and specify the CHAT_ID where reminders will be sent. Activate Workflow: Ensure the workflow is active and set to the correct timezone (e.g., Europe/Rome). Why It’s Useful Never Miss an Event**: Traditional calendar reminders can be easy to overlook, especially when scattered across platforms. This workflow consolidates reminders into a single, accessible channel (Telegram). Clear and Friendly**: The AI agent transforms generic calendar alerts into personalized, conversational reminders, making them harder to ignore. Cross-Platform Accessibility**: By delivering reminders via Telegram, users receive them in a consistent format, regardless of the device or platform they’re using. No more missed events due to unclear notifications! Need help customizing? Contact me for consulting and support or add me on Linkedin.
by Hugues Stock
What does this template do? This workflow automates the process of retrieving all Google Docs from a specified Google Drive folder, extracting their content, and structuring the data into a unified key-value dictionary, where: Key = The file name Value = The content of the document (with normalized newlines) This is ideal for use cases such as knowledge ingestion, prompt context preparation, or populating a RAG (Retrieval-Augmented Generation) system with reference documents. Use Case Perfect for teams or individuals who maintain prompts, content, or reference material in Google Docs and want to integrate that data dynamically into automation or AI workflows. What the Workflow Does ⚡ Triggered via Execute Workflow Trigger from another workflow 📁 Retrieves all files from a specified Google Drive folder 📄 Downloads the full content of each Google Docs file 🧩 Maps each file name to its content using a Set node 🧠 Aggregates all entries into a single dictionary with Code node 🧾 Outputs a JSON object like: { "Doc1": "content of doc 1", "Doc2": "content of doc 2" } Apps & Services Used Google Drive Google Docs n8n Code node Pre-requisites A connected Google account with access to the target Drive folder OAuth2 credentials for both: Google Drive Google Docs Customization Tips Change Folder: Update the Google Drive node to select a specific folder rather than root Support Other File Types: Replace or complement the Google Docs node to handle other formats (e.g., PDFs or text files) Data Cleaning: Modify the Code node to adjust text normalization to your needs Additional Use Cases 🧠 Prompt Management for AI Workflows Centralize your GPT prompt templates in Google Docs instead of hardcoding them in n8n Easily manage prompt versions and edits directly from Google Drive Dynamically load prompts into downstream nodes (like OpenAI or Hugging Face) without redeploying workflows 📚 Knowledge Base Loader for RAG Systems Aggregate internal knowledge, FAQs, SOPs, or policy docs from Google Docs into a structured dictionary Use the resulting object as the context source for Retrieval-Augmented Generation models 🎛️ Dynamic Form Inputs or Question Sets Maintain forms, surveys, or interview questions in Google Docs Load the content into n8n for form generation, chatbot interaction, or customer intake flows 📄 Client-Specific Config or Script Templates For client onboarding workflows, load client-specific scripts or prompts from individual docs named after each client Helps automate client-facing document generation or AI interactions 📋 Content Ingestion for Translation, Summarization, or Sentiment Analysis Batch process internal documentation or user-submitted Google Docs Trigger summarization, translation, or classification pipelines using the document contents 🔄 Document-to-Database Import Automatically fetch and normalize Google Docs contents, ready to push into a database (e.g., Notion, Airtable, PostgreSQL)
by PiAPI
Who is this template for? This workflow creates 360° or 180° spinning videos of high-quality 3D models with PiAPI API. Good for: Designers**: Generate inspiration into 3D designs and make them spin to gain concrete details in a efficient way. Online shoppers**: Show protential products from all angles in videos and preview overall texture of models. Content Creators** (including toy bloggers): Make fun videos of collectible models. 3D beginners:** Get simple spinning animations easily and make fun with them in a convenient way. How to customize this workflow to your need? To use this workflow, usually we need four steps: Fill in x-api-key in Mijdourney Generator node and Generate Kling Video node, fill in Header Parameters of GPT-4o Image Generator (e.g., Bearer + your X-API-Key) Enter your model prompt based on your inspiration. Click Test Workflow. Get the video URL in the last node. Use Case The prompt node concludes the main features of creations. An example for users' reference is listed as follow: Input Prompt A blind box character design, in the chibi style, a super cute little girl wearing a white long-sleeved dress and pearl earrings with her head bowed in a prayer pose, facing upwards, wearing an oversized off-white dress with large round pearls on the shoulders, minimalist simple dress with Ruffles, against a beige background, a full-body shot in a three-quarter profile view, with a black, blue, and gray color scheme, soft lighting, 3D rendering, clay material, high detail, in the Pixar style. Clean white skin, brown renaissance braided bun. --ar 1:1 --niji 6 Output Video An Example for your reference. More Example Results for Reference
by Davide
The Agent Decisioner is a dynamic, AI-powered routing system that automatically selects the most appropriate large language model (LLM) to respond to a user's query based on the query’s content and purpose. This workflow ensures dynamic, optimized AI responses by intelligently routing queries to the best-suited model. Advantages 🔁 Automatic Model Routing:** Automatically selects the best model for the job, improving efficiency and relevance of responses. 🎯 Optimized Use of Resources:** Avoids overuse of expensive models like GPT-4 by routing simpler queries to lightweight models. 📚 Model-Aware Reasoning:** Uses detailed metadata about model capabilities (e.g., reasoning, coding, web search) for intelligent selection. 📥 Modular and Extendable:** Easy to integrate with other tools or expand by adding more models or custom decision logic. 👨💻 Ideal for RAG and Multi-Agent Systems:** Can serve as the brain behind more complex agent frameworks or Retrieval-Augmented Generation pipelines. How It Works Chat Trigger: The workflow starts when a user sends a message, triggering the Routing Agent. Model Selection: The AI Agent analyzes the query and selects the best-suited model from the available options (e.g., Claude 3.7 Sonnet for coding, Perplexity/Sonar for web searches, GPT-4o Mini for reasoning). Structured Output: The agent returns a JSON response with the user’s prompt and the chosen model. Execution: The selected model processes the query and generates a response, ensuring optimal performance for the task. Set Up Steps Configure Nodes: Chat Trigger: Set up the webhook to receive user messages. Routing Agent (AI Agent): Define the system message with model strengths and JSON output rules. OpenRouter Chat Model: Connect to OpenRouter for model access. Structured Output Parser: Ensure it validates the JSON response format (prompt + model). Execution Agent (AI Agent1): Configure it to forward the prompt to the selected model. Connect Nodes: Link the Chat Trigger to the Routing Agent. Connect the OpenRouter Chat Model and Output Parser to the Routing Agent. Route the parsed JSON to the Execution Agent, which uses the chosen model via OpenRouter Chat Model1. Credentials: Ensure OpenRouter API credentials are correctly set for both chat model nodes. Test & Deploy: Activate the workflow and test with sample queries to verify model selection logic. Adjust the routing rules if needed for better accuracy. Need help customizing? Contact me for consulting and support or add me on Linkedin.