by Agent Studio
Overview This n8n workflow retrieves AI agent chat memory logs stored in Postgres and pushes them to Google Sheets, creating one sheet per session. It’s useful for teams building chat-based products or agents and needing to review or analyze session logs in a collaborative format. Who is it for Anyone with an AI Agent in Production storing the conversation logs in Postgres (or Supabase) who wants to see transcript and have control Product teams building AI agents or assistants. Teams that want to centralize conversation history for analysis or support. Anyone managing AI chat memory and needing to explore it in a spreadsheet. Prerequisites A Postgres database with a n8n_chat_histories table with an AI Agent connected to it. If you need an example, you can follow this tutorial Once done, you need to run the Postgresql query to add the created_at column (see Setup > Add a datetime column) Google Sheets access and OAuth credentials connected to n8n. A Google Sheets document set up as a template (see below). Google Sheets Template This workflow expects a Google Sheets file where each session will be stored in its own tab. A basic tab layout is duplicated and renamed with the session ID. 👉 Use this template as a starting point Note: You can hide the template after the first tabs have been created How it works Trigger The workflow can be launched manually or on a schedule (e.g. daily at noon). Retrieve sessions Runs a SQL query to get distinct session_id values from the n8n_chat_histories table. Loop over sessions For each session: Clears the corresponding sheet (if it exists). Duplicates the template tab. Renames it with the current session_id. Fetch messages Selects all messages linked to the session from Postgres. Append to sheet Adds each message to the Google Sheet with columns: Who: speaker role (user, assistant, etc.) Message: text content Date: timestamp from created_at, formatted yyyy-MM-dd hh:mm:ss Notes The sheet is cleared and rebuilt each run to ensure logs are up-to-date. If a sheet for a session doesn’t exist, it will be created by duplicating the first tab (template) You can group sessions under a persistent ID (like user_id) by overriding session_id in your memory config. Works perfectly with Supabase by using PG credentials from the connection pooler. 👉 If you're looking for a solution to better visualize and analyse conversations, reach out to us!
by William Lettieri
Overview Transform your LLM into a powerful GitHub automation specialist with this n8n workflow template. In a world where multiple MCP servers can overwhelm LLMs with context, this streamlined solution provides a dedicated GitHub Agent that handles all GitHub API operations through a single, specialized tool. When you need GitHub operations like creating repositories, managing issues, or handling pull requests, your LLM can make one simple call to the GitHub Agent. This agent specializes exclusively in GitHub MCP server operations, offloading all contextual complexity and providing clean, efficient GitHub automation. ✨ Features Single MCP Server Trigger** - One tool and one parameter to handle all GitHub API interactions Specialized GitHub Agent** - Dedicated AI agent with direct GitHub MCP Server connection Self-Executing Workflow** - "When Executed by Another Workflow" trigger enables seamless workflow chaining Scalable Architecture** - Ready to integrate with unlimited GitHub tools and operations Context Optimization** - Reduces LLM token usage by delegating GitHub complexity to a specialized agent Flexible Request Processing** - Handles any GitHub operation through natural language requests 🎯 Use Cases Repository Management** - Create, clone, and manage repositories programmatically Issue Tracking** - Automate issue creation, updates, and management workflows Pull Request Automation - Streamline code review and merge processes GitHub Actions Integration** - Trigger and monitor CI/CD workflows Team Collaboration** - Automate notifications and team management tasks Documentation Updates** - Automatically update README files and documentation 🏗️ Workflow Architecture Node Breakdown: MCP Server Trigger - Receives requests with GitHub operation parameters Set GitHub Username - Configures GitHub user context for API calls OpenAI Chat Model - Powers the intelligent GitHub agent with contextual understanding Simple Memory - Maintains conversation context and operation history GitHub AI Agent - Specialized Tools Agent with direct GitHub MCP Server access [MCP Server Trigger] → [Set GitHub Username] → [GitHub AI Agent] ↓ [OpenAI Chat Model] ← [Simple Memory] ← [GitHub API Operations] 📋 Requirements Essential Prerequisites: ✅ OpenAI API Key - For AI Agent and Chat Model functionality ✅ GitHub Username Configuration - Edit the "Set GitHub Username" node with your GitHub username for API calls ✅ n8n Version - Compatible with n8n 2024+ releases ✅ MCP Server Setup - Existing GitHub MCP server configuration Recommended Setup: GitHub Personal Access Token with appropriate permissions Basic understanding of n8n workflow configuration Familiarity with GitHub API operations 🚀 Setup Instructions Step 1: Import and Configure Import the workflow template into your n8n instance Navigate to the Set GitHub Username node Replace the placeholder with your actual GitHub username Step 2: API Keys Setup Configure your OpenAI API key in the Chat Model node Ensure your GitHub credentials are properly configured in n8n Test the connection to verify API access Step 3: MCP Server Integration Connect your existing GitHub MCP server to the workflow Verify the MCP Server Trigger is properly configured Test with a simple GitHub operation (e.g., "List my repositories") Step 4: Deploy and Test Activate the workflow in your n8n instance Test with various GitHub operations to ensure functionality Monitor execution logs for any configuration issues 🔧 Customization Options Agent Behavior Modify the Chat Model prompt** to adjust agent personality and response style Configure memory settings** to control conversation context retention Adjust timeout settings** for long-running GitHub operations GitHub Operations Extend supported operations** by adding new GitHub API endpoints Configure repository filters** to limit scope of operations Set up notification preferences** for important GitHub events Integration Points Webhook triggers** for real-time GitHub event processing Scheduled operations** for regular repository maintenance Cross-workflow triggers** for complex automation chains 💡 Pro Tips Start Simple**: Begin with basic operations like repository listing before attempting complex workflows Monitor Token Usage**: The specialized agent approach significantly reduces OpenAI API costs Batch Operations**: Group related GitHub operations in single requests for efficiency Error Handling**: The agent provides detailed error messages for troubleshooting 🤝 Support and Community Documentation**: Official n8n Documentation Community Forum**: n8n Community Issues & Contributions**: Feel free to suggest improvements or report issues 📄 License This workflow template is provided under the MIT License. You're free to use, modify, and redistribute with attribution. Created by: William Lettieri Version: 1.0 Last Updated: May 28, 2025 Compatibility: n8n 2024+
by David Olusola
PromptCraft AI – Telegram Image Generator 🚀 How It Works PromptCraft AI is an n8n automation that transforms simple image ideas sent through Telegram into stunning AI-generated images using OpenAI's DALL·E (or other image models). 🔁 Workflow Overview: Telegram Trigger: Listens for messages from a user on Telegram. Prompt Expansion: The message is transformed into a rich image description using GPT (OpenAI Chat Model). Image Generation: The prompt is passed to OpenAI's image API to generate a high-quality image. Send Image: The final image is sent back to the user on Telegram. (Optional) Log image titles and links to Google Drive and Google Sheets. ⚙️ Setup Instructions 📋 Prerequisites [ ] n8n installed (Self-hosted or via n8n.cloud) [ ] Telegram bot token (via @BotFather) [ ] OpenAI API key (platform.openai.com) [ ] Google Sheets & Drive OAuth2 credentials (optional) 🧠 Step-by-Step Configuration 1. 📥 Import the Workflow Go to n8n → click Import → upload PromptCraft_AI_Template.json 2. 🔐 Set Up Credentials In Credentials, add the following: Telegram API → Paste your bot token OpenAI API → Paste your OpenAI API key (Optional) Google Sheets OAuth2, Google Drive OAuth2 3. 🔄 Replace Placeholders Open each node that requires credentials: Replace REPLACE_OPENAI_API_KEY with your actual OpenAI API key Replace REPLACE_TELEGRAM_API_ID and credential names as needed (Optional) Update Google Drive Folder ID & Sheet ID in respective nodes 4. ✅ Activate the Workflow Turn on the Telegram Trigger node. Deploy and activate the full workflow. 5. ✉️ Test It Out Send your Telegram bot a message like: > a knight riding a robotic horse in the future Receive the generated image back in Telegram! 💡 Pro Tips Use detailed or imaginative inputs for better outputs. Fine-tune the GPT prompt for specific visual styles. Extend with Google Vision, image upscaling, or watermarking. 🛟 Support For setup assistance or custom feature requests, feel free to contact me @dimejicole21@gmail.com Happy Prompting! 🖼✨
by RedOne
Smart Customer Support AI Agent with Gmail and Telegram Who is this for? This workflow is perfect for: Small to medium businesses** looking to automate customer support E-commerce stores** handling order inquiries and customer questions SaaS companies** providing technical support to users Service providers** managing appointment bookings and general inquiries Startups** wanting to provide 24/7 customer service without hiring full-time staff Agencies** managing client communications across multiple channels What problem is this workflow solving? Customer support is essential but resource-intensive. Common challenges include: Slow response times** leading to frustrated customers Repetitive questions** consuming valuable staff time Inconsistent responses** across different support agents Limited availability** outside business hours Scaling support costs** as business grows Context loss** when customers switch between channels This workflow eliminates these pain points by providing instant, consistent, and intelligent responses 24/7. What this workflow does Core Functionality Multi-Channel Monitoring: Simultaneously watches Gmail and Telegram for customer inquiries Intelligent Processing: Uses AI to understand customer intent and context Knowledge Base Integration: Accesses your company's FAQ and support information Contextual Responses: Provides personalized, helpful replies maintaining conversation history Smart Escalation: Automatically escalates complex issues to human agents Comprehensive Logging: Tracks all interactions for analytics and improvement AI Agent Capabilities Natural Language Understanding**: Comprehends customer questions in plain English Context Awareness**: Remembers previous conversations with each customer Knowledge Retrieval**: Searches your knowledge base for accurate information Response Generation**: Creates professional, brand-appropriate responses Escalation Decision**: Identifies when human intervention is needed Multi-Channel Support**: Handles Gmail and Telegram with channel-specific formatting Automation Features Auto-Response**: Replies to customers within seconds Email Management**: Marks processed emails as read Conversation Threading**: Maintains context in email threads and Telegram chats Error Handling**: Gracefully handles failures with admin notifications Analytics Tracking**: Logs interactions for performance monitoring Setup Prerequisites Active Google Workspace or Gmail account Telegram account for bot creation OpenAI API access Google Sheets access n8n instance (cloud or self-hosted) Step 1: Credential Setup Gmail OAuth2 Configuration Go to Google Cloud Console Create new project or select existing one Enable Gmail API Create OAuth 2.0 credentials Add authorized redirect URIs for n8n In n8n: Settings → Credentials → Add Gmail OAuth2 Enter Client ID and Client Secret Complete OAuth flow Telegram Bot Setup Message @BotFather on Telegram Create new bot with /newbot command Choose bot name and username Copy the bot token In n8n: Settings → Credentials → Add Telegram Enter bot token Set webhook URL in bot settings OpenAI API Configuration Sign up at OpenAI Platform Generate API key in API Keys section In n8n: Settings → Credentials → Add OpenAI Enter API key Choose appropriate model (gpt-4o-mini recommended) Google Sheets Setup Use existing Google account from Gmail setup In n8n: Settings → Credentials → Add Google Sheets OAuth2 Complete authorization flow Step 2: Google Sheets Preparation Create three Google Sheets in your Google Drive: Knowledge Base Sheet Sheet Name**: "Knowledge Base" Columns**: ID, Category, Question/Topic, Answer/Response, Keywords, Last_Updated Import sample data from the Knowledge Base example Customize with your company's FAQs and policies Escalation Tracker Sheet Sheet Name**: "Escalations" Columns**: Timestamp, Customer_Name, Customer_Contact, Inquiry_Summary, Escalation_Reason, Priority, Status, Assigned_To This will be auto-populated by the AI agent Interaction Log Sheet Sheet Name**: "Interaction Log" Columns**: Timestamp, Channel, Customer_Name, Customer_Contact, Inquiry_Subject, Customer_Message, AI_Response, Response_Time, Status This tracks all customer interactions for analytics Step 3: Workflow Configuration Import Template Copy the workflow JSON from the template In n8n: Import workflow from JSON Replace placeholder Sheet IDs with your actual Google Sheet IDs Update Sheet References Open each Google Sheets node Select your created sheets from the dropdown Verify column mappings match your sheet structure Customize AI Prompts Edit the "Customer Support AI Agent" node Update system message with: Your company name and description Brand voice and tone guidelines Specific policies and procedures Escalation criteria Configure Error Notifications (Optional) Set up Slack webhook or email notifications Update error notification node with your webhook URL Customize error message format Step 4: Testing Test Gmail Integration Send test email to your support Gmail account Check workflow execution in n8n Verify response is sent and email marked as read Check interaction logging in Google Sheets Test Telegram Integration Send message to your Telegram bot Verify bot responds appropriately Test conversation memory with follow-up messages Check escalation functionality with complex request Test Knowledge Base Ask questions covered in your knowledge base Verify AI retrieves and uses correct information Test with variations of the same question Ensure responses are consistent and helpful How to customize this workflow to your needs Brand Voice Customization Update the AI system prompt to include: Your company's tone (formal, casual, friendly) Key phrases and terminology you use Brand personality traits Communication style preferences Knowledge Base Expansion Add industry-specific FAQs Include product documentation Add troubleshooting guides Create category-specific responses Escalation Rules Customize when to escalate by modifying the AI agent instructions: Billing disputes over $X amount Technical issues requiring developer help Angry or dissatisfied customers Requests outside standard services Legal or compliance questions Additional Channels Extend the workflow to support: Slack**: Add Slack triggers and response nodes WhatsApp**: Integrate WhatsApp Business API Web Chat**: Add webhook triggers for website chat Discord**: Connect Discord bot integration Analytics Enhancement Add sentiment analysis to customer messages Implement customer satisfaction scoring Create automated reporting dashboards Set up alert thresholds for escalation rates Integration Opportunities CRM Integration**: Connect to HubSpot, Salesforce, or Pipedrive Ticketing System**: Link to Zendesk, Freshdesk, or Jira Service Desk E-commerce Platform**: Integrate with Shopify, WooCommerce, or Magento Calendar Booking**: Connect to Calendly or Acuity for appointment scheduling Advanced Features Multi-language Support**: Add translation capabilities Voice Messages**: Integrate speech-to-text for Telegram voice notes Image Recognition**: Process customer screenshots for technical support Proactive Outreach**: Send follow-up messages based on customer behavior Workflow Maintenance Daily Tasks Review escalation queue Monitor error notifications Check response quality in interaction log Weekly Reviews Analyze customer interaction patterns Update knowledge base with new common questions Review escalation reasons and optimize AI prompts Monthly Optimization Export interaction data for detailed analysis Calculate key metrics (response time, resolution rate, escalation rate) Update AI model parameters based on performance Expand knowledge base with seasonal or trending topics Key Metrics to Track Response Time**: Average time from customer message to AI response Resolution Rate**: Percentage of inquiries resolved without escalation Customer Satisfaction**: Based on follow-up surveys or sentiment analysis Escalation Rate**: Percentage of conversations requiring human intervention Channel Performance**: Effectiveness of Gmail vs Telegram vs other channels Knowledge Base Usage**: Which topics are accessed most frequently Peak Hours**: When customers contact support most often Troubleshooting Common Issues Gmail not triggering**: Check OAuth permissions and API quotas Telegram bot not responding**: Verify bot token and webhook configuration AI responses seem off**: Review and update system prompts Escalations not logging**: Check Google Sheets permissions and column mapping High escalation rate**: Expand knowledge base and refine AI instructions Performance Optimization Monitor OpenAI API usage and costs Adjust AI model temperature for response consistency Optimize knowledge base for faster searches Set appropriate conversation memory limits This workflow provides a solid foundation for automated customer support that can be extensively customized to match your specific business needs and grow with your company.
by David Olusola
🔍 What This Workflow Does This RAG Pipeline in n8n automates document ingestion from Google Drive, vectorizes it using OpenAI embeddings, stores it in Pinecone, and enables chat-based retrieval using LangChain agents. Main Functions: 📂 Auto-detects new files uploaded to a specific Google Drive folder. 🧠 Converts the file into embeddings using OpenAI. 📦 Stores them in a Pinecone vector database. 💬 Allows a user to query the knowledge base through a chat interface. 🤖 Uses a GPT-4o-mini model with LangChain to generate intelligent responses using retrieved context. ⚙️ Setup Instructions Connect Accounts Ensure these services are connected in n8n: ✅ Google Drive (OAuth2) ✅ OpenAI ✅ Pinecone You can do this in n8n > Credentials > New and use the matching names from the file: Google Drive: "Google Drive account 2" OpenAI: "OpenAi success" Pinecone: "PineconeApi account 2" Folder Setup Upload your documents to this folder in Google Drive: 📁 Power Folder The workflow is triggered every minute when a new file is uploaded. Workflow Overview A. File Ingestion Path Google Drive Trigger — detects new file. Google Drive (Download) — downloads the new file. Recursive Text Splitter — splits text into chunks. Default Data Loader — loads content as LangChain documents. OpenAI Embeddings — converts text chunks into embeddings. Pinecone Vector Store — stores them in "ragfile" index. B. Chat Retrieval Path When chat message received — AI Agent — LangChain agent managing tools. OpenAI Chat Model (GPT-4o-mini) — generates replies. Pinecone Vector Store (retrieval) — retrieves matching content. Embeddings OpenAI1 — helps match queries to document chunks.
by InfraNodus
Using the knowledge graphs instead of RAG vector stores This workflow creates a Telegram chatbot agent that has access to several knowledge bases at the same time (used as "experts"). These knowledge bases are provided using the InfraNodus GraphRAG using the knowledge graphs and providing high-quality responses without the need to set up complex RAG vector store workflows. The advantages of using GraphRAG instead of the standard vector stores for knowledge are: Easy and quick to set up and update (no complex data import workflows or vector stores needed) A knowledge graph has a holistic view of your knowledge base and knows what it's about Better retrieval of relations between the document chunks = higher quality responses How it works This template uses the n8n AI agent node as an orchestrating agent that decides which tool (knowledge graph) to use based on the user's prompt. Here's a description step by step: The user submits a question using the Telegram bot, which is then received in the n8n workflow via the Telegram trigger node. The AI agent node checks a list of tools it has access to. Each tool has a description of the knowledge it has auto-generated by InfraNodus. The AI agent decides which tool should be used to generate a response. It may reformulate user's query to be more suitable for the expert. The query is then sent to the InfraNodus HTTP node endpoint, which will query the graph that corresponds to that expert. Each InfraNodus GraphRAG expert provides a rich response that takes the whole context into account and provides a response from each expert (graph) along with a list of relevant statements retrieved using a combination or RAG and GraphRAG. The n8n AI Agent node integrates the responses received from the experts to produce the final answer. The final answer is sent back to the Telegram bot who delivers it back to the private chat or a Telegram group. How to use You need an InfraNodus GraphRAG API account and key to use this workflow. Create an InfraNodus account Get the API key at https://infranodus.com/api-access and create a Bearer authorization key for the InfraNodus HTTP nodes. Create a separate knowledge graph for each expert (using PDF / content import options) in InfraNodus For each graph, go to the workflow, paste the name of the graph into the body name field. Keep other settings intact or learn more about them at the InfraNodus access points page. Once you add one or more graphs as experts to your flow, add the LLM key to the OpenAI node Create a Telegram bot (the instructions are in the workflow Post note) — it takes 30 seconds. Get its API key and create the Telegram credentials to use in the Telegram nodes in this workflow. Requirements An InfraNodus account and API key An OpenAI (or any other LLM) API key A Telegram account Customizing this workflow You can use this same workflow with a standard AI chatbot via a URL that can also be embedded to any website. You can also use it with ElevenLabs AI voice agent. There are many more customizations available. Check out the complete guide at https://support.noduslabs.com/hc/en-us/articles/20174217658396-Using-InfraNodus-Knowledge-Graphs-as-Experts-for-AI-Chatbot-Agents-in-n8n Also check out the video tutorial with a demo: Support If you have any questions, contact us via the support portal at https://support.noduslabs.com or via our Discord channel. More n8n workflows are available on our support portal: n8n x InfraNodus AI automation workflows.
by Davide
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 YOUR_FTP_URL 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.
by Alex Kim
🎬 Google Veo 3 Prompt and Video Generator via Leonardo.ai + Claude 4 Transform text descriptions into cinematic videos using Google's Veo 3 model through Leonardo.ai's platform! 🚀 What This Workflow Does This advanced automation pipeline takes your creative ideas and turns them into professional-quality videos using Google's powerful Veo 3 model (accessed via Leonardo.ai), enhanced by Claude 4's sophisticated prompt engineering. ✨ Key Features 🤖 AI-Powered Prompt Enhancement**: Uses Claude 4 Sonnet with Wikipedia integration to craft optimal Google Veo 3 prompts 🎥 Professional Video Generation**: Leverages Google's Veo 3 model through Leonardo.ai for high-quality text-to-video conversion ☁️ Automatic Cloud Storage**: Videos are automatically saved to your Google Drive 📋 Structured Prompting**: Follows Google Veo3 best practices with 8 essential elements (Subject, Context, Action, Style, Camera Motion, Composition, Ambiance, Audio) ⚡ Hands-Off Processing**: Set it and forget it - the workflow handles the entire pipeline 🔧 How It Works Input Your Concept - Describe your video idea in the "Video Context" node AI Enhancement - Claude 4 transforms your description into a cinematic Google Veo 3 prompt using advanced techniques Video Generation - Google's Veo 3 model (via Leonardo.ai) creates your video (720p resolution, ~8 seconds) Smart Waiting - 4-minute processing buffer ensures completion Auto-Download - Retrieves the finished video from Leonardo's servers Cloud Storage - Uploads directly to your Google Drive folder 💡 Perfect For Content Creators** looking to automate video production Marketing Teams** needing quick promotional videos Educators** creating engaging visual content Social Media Managers** generating scroll-stopping content Creative Professionals** exploring AI-assisted filmmaking 📋 Requirements Leonardo AI account with API access Anthropic API key (Claude 4 Sonnet) Google Drive integration N8N instance (cloud or self-hosted) 👨💻 About the Creator Created by: AlexK1919 - AI-Native Workflow Automation Architect, n8n Ambassador and Verified Partner, Co-Founder @ WotAI If you'd like to review more Google Veo 3 Prompts organized by business category, check out over 9,000+ free, pre-made prompts at: Google Veo 3 Prompts 📄 License This workflow is available under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. You are free to use, adapt, and share this workflow for non-commercial purposes under the terms of this license. Full license details: https://creativecommons.org/licenses/by-nc-sa/4.0/ 🎯 Example Output Input: "Star Wars stormtrooper digging for uranium in desert, saying something funny" The AI generates a structured prompt with: Subject**: Detailed character description Context**: Desert environment specifics Action**: Dynamic digging movements Style**: Cinematic vlog aesthetic Camera**: Appropriate angles and movement Audio**: Dialogue, sound effects, and music ⚙️ Setup Notes Character Limit**: Prompts are optimized for Leonardo's 1,500 character API limit Processing Time**: Allow 4+ minutes for Google Veo3 video generation Quality**: 720p resolution with native audio generation Consistency**: Uses advanced Google Veo3 prompting for reliable results 🔄 Customization Options Modify the prompt engineering system message for different styles Adjust video resolution and model parameters Change storage destination (Google Drive folder) Add post-processing steps or notifications 📈 Why This Workflow Rocks Unlike simple text-to-video tools, this workflow: Intelligently enhances** your prompts using AI for Google Veo 3 Follows industry best practices** for Google Veo3 prompting Automates the entire pipeline** from idea to stored video Leverages multiple AI models** for superior results Handles technical details** like API limits and timing 🚨 Pro Tips Be specific in your initial context - detail creates better videos The workflow includes comprehensive Google Veo3 prompting guidelines Videos are typically 5-8 seconds - plan accordingly for longer content Experiment with different styles and camera movements optimized for Veo 3 The AI can access Wikipedia for factual enhancement Ready to revolutionize your video creation process? Import this workflow and start generating professional videos with just a text description! Perfect for anyone looking to harness the power of AI for content creation. Tags: #veo3 #GoogleVeo3 #AI #VideoGeneration #Leonardo #Claude #Automation #ContentCreation #GoogleAI
by Airtop
README Automating Video File Download from Sample.cat with Airtop.ai Use Case Automating file downloads from web pages is useful for scenarios like bulk media retrieval, dataset access, or recurring content backups. This workflow ensures a hands-free, consistent process for retrieving downloadable content. What This Automation Does This automation performs a reliable download of a video file from a specified webpage using the following steps: Initiates an Airtop browser session. Opens a specified URL containing downloadable media. Interacts with the page to click the download button. Waits for the file to be processed and made available. Retrieves metadata to confirm availability. Downloads the file. Terminates the browser session to clean up resources. How It Works Manual Trigger: Activated by user test. Session: Starts an Airtop browser session. Window: Navigates to https://sample.cat/en/webm. Interaction: Simulates a click on the download button for the video titled “SD 640x360 (Seawater, drone view video, 30 FPS)”. Wait: Pauses for 10 seconds to allow the file to be ready for download. Get File Data: Checks for downloadable files in the session. Download File: Retrieves the file using its ID. Terminate: Ends the browser session to free up resources. Setup Requirements Airtop API Key — required to authenticate API calls. Next Steps Enhance with Retry Logic**: Loop file availability check until status = available for more robust automation. Customize File Targets**: Dynamically pass URLs and button descriptors for multi-source downloads. Connect to Storage**: Pipe downloaded files to cloud storage or databases for archiving. Read more about automating file downloads from the web
by Jez
This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n. This workflow demonstrates how to build and expose a sophisticated n8n AI Agent as a single, callable tool using the Multi-Agent Collaboration Protocol (MCP). It allows external clients or other AI systems to easily query software library documentation via Context7, without needing to manage the underlying tool orchestration or complex conversational logic. Core Idea: Instead of building complex agentic loops on the client-side (e.g., in Python, a VS Code extension, or another AI development environment), this workflow offloads the entire agent's reasoning and tool-use process to n8n. The client simply sends a natural language query (like "How do I use Flexbox in Tailwind CSS?") to an SSE endpoint, and the n8n agent handles the rest. Key Features & How It Works: Public MCP Endpoint: The main workflow uses the Context7 MCP Server Trigger node to create an SSE endpoint. This makes the agent accessible to any MCP-compatible client. The path for the endpoint is kept long and random for basic 'security by obscurity'. Tool Workflow as an Interface: A Tool Workflow node (named call_context7_ai_agent in this example) is connected to the MCP Server Trigger. This node defines the single "tool" that external clients will see and call. Dedicated AI Agent Sub-Workflow: The call_context7_ai_agent tool invokes a separate sub-workflow which contains the actual AI logic. This sub-workflow starts with a Context7 Workflow Start node to receive the user's query. A Context7 AI Agent node (using Google Gemini in this example) is the brain, equipped with: A system prompt to guide its behavior. Simple Memory to retain context for each execution (using {{ $execution.id }} as the session key). Two specialized Context7 MCP client tools: context7-resolve-library-id: To convert library names (e.g., 'Next.js') into Context7-specific IDs. context7-get-library-docs: To fetch documentation using the resolved ID, with options for specific topics and token limits. Seamless Tool Use: The AI Agent autonomously decides when and how to use the resolve-library-id and get-library-docs tools based on the user's query, handling the multi-step process internally. Benefits of This Approach: Simplified Client Integration:** Clients interact with a single, powerful tool, sending a simple query. Reduced Client-Side Token Consumption:** The detailed prompts, tool descriptions, and conversational turns are managed server-side by n8n, saving tokens on the client (especially useful if the client is another LLM). Centralized Agent Management:** Update your agent's capabilities, tools, or LLM model within n8n without any changes needed on the client side. Modularity for Agentic Systems:** Perfect for building complex, multi-agent systems where this n8n workflow can act as a specialized "expert" agent callable by others (e.g., from environments like Smithery). Cost-Effective:** By using a potentially less expensive model (like Gemini Flash) for the agent's orchestration and leveraging the free tier or efficient pricing of services like Context7, you can build powerful solutions economically. Use Cases: Providing an intelligent documentation lookup service for coding assistants or IDE extensions. Creating specialized AI "micro-agents" that can be consumed by larger AI applications. Building internal knowledge base query systems accessible via a simple API-like interface. Setup: Ensure you have the necessary n8n credentials for Google Gemini (or your chosen LLM) and the Context7 MCP client tools. The Path in the Context7 MCP Server Trigger node should be unique and secure. Clients connect to the "Production URL" (SSE endpoint) provided by the trigger node. This workflow is a great example of how n8n can serve as a powerful backend for building and deploying modular AI agents. I've made a video to try and explain this a bit too https://www.youtube.com/watch?v=dudvmyp7Pyg
by Daniel Ng
Advanced n8n Error Handling: Automated Email Alerts & Global Error Workflow Configuration In any automated environment, n8n workflows, while powerful, can sometimes encounter unexpected issues or fail during execution. Without a dedicated error handling strategy, these failures might go unnoticed, leading to incomplete processes, data inconsistencies, or critical operational disruptions. Manually monitoring every workflow execution or sifting through logs for error details is inefficient and can significantly delay crucial fixes. This is where a centralized, automated error management system becomes essential to maintain reliability and quickly address any problems. The "Advanced n8n Error Handling: Automated Email Alerts & Global Error Workflow Configuration" template provides a robust solution to proactively manage and respond to errors within your n8n instance. For more powerful n8n templates, visit our website or contact us at AI Automation Pro. We help your business build custom AI workflow automation and apps. Highlight features Automated Email Notifications:** Sends detailed HTML emails via Gmail for both execution and trigger failures, ensuring you're promptly informed. Centralized Error Management:** Acts as a single, dedicated workflow to catch and process errors from multiple other n8n workflows. Proactive Global Error Handler Configuration:** A scheduled task automatically scans and updates other active n8n workflows to use this workflow as their default error handler, ensuring consistent error management. Comprehensive Error Reporting:** Notification emails are rich with information, including error messages, stack traces, the last executed node, direct links to failed executions, and detailed trigger failure context. Dynamic Email Content:** The subject line and body of the notification email are dynamically adjusted based on whether the failure was an execution error or a trigger failure. Highly Customizable:** Offers flexibility to modify email content (HTML), change the notification channel (e.g., Slack, other email providers), and adjust the logic for updating other workflows' error handlers. Scheduled Operation:** The global configuration part runs on a user-definable schedule (e.g., daily, hourly) for proactive and automated error handling setup across your n8n instance. Who is this for? This workflow is designed for n8n users and administrators who want to: Establish a resilient and centralized error handling mechanism across their n8n instance. Receive immediate and detailed email notifications for any workflow failures. Automate the process of assigning a default error handling workflow to all their active n8n workflows. Save time on manually configuring error handlers for each individual workflow and ensure comprehensive error coverage. What problem is this workflow solving? / use case In an n8n environment with multiple workflows, errors can occur without immediate visibility. This can lead to: Unnoticed failures, potentially causing data loss or incomplete automated processes. Time-consuming diagnosis of issues due to a lack of readily available, detailed error information. Inefficiency and oversight from manually setting an error workflow for every new or existing workflow. This template tackles these issues by providing a proactive error management system. It not only alerts you to failures with comprehensive details but also ensures that your other workflows are automatically configured to use this centralized handler. What this workflow does This workflow operates in two distinct yet complementary parts: 1\. Scheduled Global Error Handler Configuration: Trigger:** Initiates based on a configurable schedule (e.g., daily, hourly). Identify Self:** Retrieves its own workflow ID to use as the designated error handler. Scan Workflows:** Fetches a list of all other workflows within your n8n instance. Conditional Update Logic:** For each active workflow found, it checks if: An error workflow (errorWorkflow setting) is not currently set, OR The currently set errorWorkflow is different from this central error handling workflow. The workflow is active. Apply Default Handler:** If the above conditions are met, it automatically updates the target workflow's settings. This sets the current workflow as its default error handler, ensuring that any future errors in those workflows are routed here. The callerPolicy setting is also removed during this update. 2\. Error Notification via Email: Trigger:** Activates whenever an error occurs in any n8n workflow that has this workflow designated as its errorWorkflow. Gather Error Context:** Collects vital information about the failure, such as: The base URL of your n8n instance. Specific details of the workflow that failed (name, ID). The nature of the error: whether it's an "execution error" (occurring mid-workflow) or a "trigger failure" (occurring at the start). Format Detailed Error Message:** Constructs a comprehensive HTML email tailored to the error type: For Execution Errors: The email includes a direct link to the failed execution's page, the timestamp of the error, the name of the last node that successfully executed, the error message, and the full error stack trace. For Trigger Failures: The email includes the timestamp, operational mode, error message, error name and description, relevant context data, details about the cause (message, name, code, status), and the stack trace. Send Email Notification:** Dispatches the formatted HTML email using Gmail to a predefined recipient. The email subject line dynamically indicates the name of the failing workflow and the type of error, providing a quick overview. Setup Import Workflow: Import the JSON file into your n8n instance. Configure Credentials: n8n API Access: Locate the nodes: "N8n Get Error Handler", "N8n Get All Workflows", and "N8n Update Workflow". For each, select or create new n8n API credentials. These credentials must have permissions to read all workflows (workflows.read) and update workflows (workflows.update). Gmail Access: Locate the "Gmail Send Notification" node. Select or create new Gmail OAuth2 credentials to authorize n8n to send emails on your behalf. Set Email Recipient and Sender Details: Navigate to the "Settings" node, which is connected directly after the "Error Trigger" node. Modify the value for the Email Receiver variable to the email address where error notifications should be sent. Optionally, update the Email Sender Name variable. Configure Schedule (Optional): Select the "Schedule Trigger" node. Adjust the "Trigger Interval" (e.g., Every Day, Every Hour) according to how frequently you want the workflow to scan and update the error handler settings for other workflows in your n8n instance. Activate Workflow: Ensure this workflow is toggled to "Active". Once active, its scheduled component will begin operating, and it will be ready to process and notify on errors from other linked workflows. Manual Configuration (Optional): While this workflow automates the assignment, you can also manually set this workflow as the errorWorkflow in the settings of any critical existing workflows for immediate protection. How to customize this workflow to your needs Email Content & Formatting:** Modify the HTML content within the "HTML For Execution Error" and "HTML For Trigger Error" nodes to alter the appearance, structure, or information included in the notification emails. Alternative Notification Channels:** Replace the "Gmail Send Notification" node with a different email service node (e.g., Microsoft Outlook, SendGrid) or integrate other notification platforms like Slack, Microsoft Teams, or Discord. Remember to adjust the input data mappings for the new node. Refine Global Update Logic:** Adjust the conditions within the "If No Default Error Handler Set" node if you need more granular control over which workflows are automatically updated (e.g., filter by workflow tags, names, or explicitly exclude certain workflows). Enrich Error Data:** Insert additional nodes after the "Error Trigger" but before the "Settings" node if you need to fetch more context about the error or the workflow that failed (e.g., look up related information from a database or API). Advanced Notification Routing:** Implement more complex logic prior to sending notifications. For example, you could use a Switch node to route error alerts to different email addresses or channels based on the name of the failing workflow or the severity of the error. Handling of callerPolicy:** The "Set Data" node is configured to remove the callerPolicy setting from workflows it updates. If your workflows rely on this setting, you may need to modify or remove this part of the "Set Data" node's code. Adjust Scheduled Task:** Change the frequency or timing of the "Schedule Trigger" to better suit your operational needs for the global error handler update.
by Automate With Marc
🧠 Google Drive Upload Trigger → Pinecone Vector Upsert for Document Indexing Category: AI & LLM / Document Indexing Level: Intermediate Tags: Google Drive, Pinecone, OpenAI, Embeddings, Vector Store, LangChain, RAG 📄 What This Workflow Does This workflow watches a specific Google Drive folder and automatically uploads any newly added document to a Pinecone vector database — complete with OpenAI-generated embeddings. Perfect for setting up retrieval-augmented generation (RAG) pipelines, semantic search, or document Q&A systems. Once configured, your knowledge base stays up-to-date with zero manual effort. Watch Full Step By Stey Tutorial Video Here: https://www.youtube.com/@Automatewithmarc 🔧 How It Works 📁 Google Drive Trigger Watches a specific folder and triggers when new documents are uploaded. 🔍 Google Drive File Search & Download Finds and fetches all files in the folder. 🔄 Loop Over Each File Handles batch processing for multiple files. 📃 Document Loader Parses each file as binary and applies custom metadata like document type. ✂️ Text Splitter Breaks content into manageable chunks for embedding (e.g., 600 characters, 60 overlap). 🧠 OpenAI Embeddings Generates vector embeddings using OpenAI. 📦 Pinecone Vector Store Inserts/upserts documents into a specific Pinecone namespace for search-ready indexing. 🧠 Why This is Useful This is a production-grade setup for: Building vector search tools over internal docs Feeding up-to-date data into RAG agents or chatbots Auto-tagging and chunking files for scalable AI workflows Whether you’re indexing course outlines, SOPs, or technical docs — this automation keeps your vector store fresh and organized. 🪜 Setup Instructions Connect your Google Drive, OpenAI, and Pinecone accounts. Specify the Google Drive folder to monitor. Customize metadata, chunk size, or vector namespace as needed. Activate the workflow and drop a file into the folder — magic happens behind the scenes. 📌 Notes Works best with PDFs or text-based documents. You can swap out OpenAI with other embedding models if needed. Consider adding notifications or logging (e.g., via Slack or email) for better observability.