23 templates found
Category:
Author:
Sort:

Generate SQL queries from schema only - AI-powered

This workflow is a modification of the previous template on how to create an SQL agent with LangChain and SQLite. The key difference – the agent has access only to the database schema, not to the actual data. To achieve this, SQL queries are made outside the AI Agent node, and the results are never passed back to the agent. This approach allows the agent to generate SQL queries based on the structure of tables and their relationships, without having to access the actual data. This makes the process more secure and efficient, especially in cases where data confidentiality is crucial. πŸš€ Setup To get started with this workflow, you’ll need to set up a free MySQL server and import your database (check Step 1 and 2 in this tutorial). Of course, you can switch MySQL to another SQL database such as PostgreSQL, the principle remains the same. The key is to download the schema once and save it locally to avoid repeated remote connections. Run the top part of the workflow once to download and store the MySQL chinook database schema file on the server. With this approach, we avoid the need to repeatedly connect to a remote db4free database and fetch the schema every time. As a result, we reach greater processing speed and efficiency. πŸ—£οΈ Chat with your data Start a chat: send a message in the chat window. The workflow loads the locally saved MySQL database schema, without having the ability to touch the actual data. The file contains the full structure of your MySQL database for analysis. The Langchain AI Agent receives the schema, your input and begins to work. The AI Agent generates SQL queries and brief comments based solely on the schema and the user’s message. An IF node checks whether the AI Agent has generated a query. When: Yes: the AI Agent passes the SQL query to the next MySQL node for execution. No: You get a direct answer from the Agent without further action. The workflow formats the results of the SQL query, ensuring they are convenient to read and easy to understand. Once formatted, you get both the Agent answer and the query result in the chat window. 🌟 Example queries Try these sample queries to see the schema-driven AI Agent in action: Would you please list me all customers from Germany? What are the music genres in the database? What tables are available in the database? Please describe the relationships between tables. - In this example, the AI Agent does not need to create the SQL query. And if you prefer to keep the data private, you can manually execute the generated SQL query in your own environment using any database client or tool you trust πŸ—„οΈ πŸ’­ The AI Agent memory node does not store the actual data as we run SQL-queries outside the agent. It contains the database schema, user questions and the initial Agent reply. Actual SQL query results are passed to the chat window, but the values are not stored in the Agent memory.

YuliaBy Yulia
52198

Enhance customer chat by buffering messages with Twilio and Redis

This n8n workflow demonstrates a simple approach to improve chat UX by staggering an AI Agent's reply for users who send in a sequence of partial messages and in short bursts. How it works Twilio webhook receives user's messages which are recorded in a message stack powered by Redis. The execution is immediately paused for 5 seconds and then another check is done against the message stack for the latest message. The purpose of this check lets use know if the user is sending more messages or if they are waiting for a reply. The execution is aborted if the latest message on the stack differs from the incoming message and continues if they are the same. For the latter, the agent receives the buffered messages up to that point and is able to respond to them in a single reply. Requirements A Twilio account and SMS-enabled phone number to receive messages. Redis instance for the messages stack. OpenAI account for the language model. Customising the workflow This workflow should work for other common messaging platforms such as Whatsapp and Telegram. 5 seconds too long or too short? Adjust the wait threshold to suit your customers.

JimleukBy Jimleuk
10721

Natural language database queries with dual-agent AI & PostgreSQL integration

AI Database Assistant with Smart Query's & PostgreSQL Integration Description: πŸš€ Transform Your Database into an Intelligent AI Assistant This workflow creates a smart database assistant that safely handles natural language queries without crashing your system. Features dual-agent architecture with built-in query limits and PostgreSQL optimization – perfect for commercial applications! βœ… Ideal for: SaaS developers building database search features πŸ” Database administrators providing safe AI access πŸ›‘οΈ Business teams needing user-friendly data queries πŸ“Š Anyone wanting ChatGPT-like database interaction πŸ€– πŸ”§ How It Works 1️⃣ User asks a question – "Show me top 10 popular products" 2️⃣ Main AI Agent – Interprets the request and ensures safety limits 3️⃣ SQL Sub-Agent – Generates precise PostgreSQL queries 4️⃣ Database executes – Returns formatted, limited results safely ⚑ Setup Instructions 1️⃣ Prepare Your Database Ensure PostgreSQL is accessible from n8n Note your table structure and column names Set up database connection credentials 2️⃣ Customize the Templates Replace [YOURTABLENAME] with your actual table name Update [YOUR_FIELDS] with your column names Modify examples to match your use case Important: Keep all LIMIT clauses intact! 3️⃣ Configure the Agents Copy Main Agent system message to your primary AI node Copy Sub-Agent system message to your SQL generator node Connect the sub-workflow between both agents 4️⃣ Test & Deploy Test with sample queries like "Show me 5 recent items" Verify query limits work (max 50 results) Deploy and monitor performance 🎯 Why Use This Workflow? βœ”οΈ System Protection – Built-in limits prevent crashes from large queries βœ”οΈ Natural Language – Users ask questions in plain English βœ”οΈ Commercial Ready – Generic templates work with any database βœ”οΈ Dual-Agent Safety – Smart interpretation + precise SQL generation βœ”οΈ PostgreSQL Optimized – Handles complex schemas and data types 🚨 Critical Features Query Limits: Default 10, maximum 50 results (can be modified) Error Prevention: No unlimited data retrieval Smart Routing: Natural language β†’ Safe SQL β†’ Formatted results Customizable: Works with any PostgreSQL database schema πŸ”— Start building your AI database assistant today – safe, smart, and scalable!

PaulBy Paul
7680

Create a website screenshot and send via Telegram channel

This workflow allows you to create a screenshot of a website and send it to a telegram channel.

Harshil AgrawalBy Harshil Agrawal
3654

Generate & post animated anime wallpapers to TikTok with Flux AI and Fal AI

Automatically create AI-generated anime wallpapers, transform them into animated videos, and post them to TikTok β€” all with one n8n workflow. What Problem Is This Workflow Solving? / Use Case Creating and publishing engaging anime content for TikTok is often time-consuming. From generating ideas, creating visuals, animating them, and finally uploading to TikTok, the process usually requires multiple tools and manual effort. This workflow solves that by automating the entire pipeline β€” from anime wallpaper generation to video animation and auto-posting on TikTok β€” all in one place. Perfect for content creators, anime enthusiasts, and marketers who want to consistently deliver fresh, unique TikTok content without the hassle. --- Who Is This For Anime Creators & Fans: Share unique AI-generated anime content with your TikTok audience. Content Creators & Influencers: Keep your TikTok feed active without spending hours designing and editing. Marketers & Social Media Managers: Automate anime-themed campaigns to attract new audiences. Automation Enthusiasts: Explore creative ways to connect AI models and publishing platforms using n8n. --- What This Workflow Does Collects anime topic & style via an n8n Form (or scheduled trigger). Uses Groq + GPT-OSS to generate a text-to-image prompt. Creates an anime wallpaper using the Flux AI model (Pollination AI). Transforms the wallpaper into an animated video with Fal AI (Minimax Hailuo 02 Fast). Automatically posts the final video to TikTok via the GetLate API. --- How to Use Set up Groq Add your Groq API Key to the Groq Chat Model node. Select an LLM model (default: OpenAI GPT-OSS 120B). Set up TikTok posting Get your API key from getlate.dev. Add the credentials to the Upload IMG and TikTok Post nodes. Set up Fal AI for video generation Get your API key from Fal.ai and top up credits. Add your Fal AI credentials to the Create Video, Get Status, and Get Video nodes. Run the workflow Open the n8n Form URL (Test or Production). Enter your anime topic and style. The workflow will generate the image, animate it, and post directly to TikTok. Possible Customizations: Replace the default Form Trigger with a Scheduled Trigger. Connect a topics database (e.g., Google Sheets or Airtable) to automatically generate and post animated anime wallpapers on TikTok at regular intervals.

FariezBy Fariez
2787

Generate n8n forms from Airtable and BaseRow tables

This n8n template showcases a cool feature of n8n Forms where the form itself can be defined dynamically using the form fields schema. It may be debateable how useful this template actually is since both Airtable and Baserow provide form interfaces already but still a great exercise and demonstration if ever the use-case comes around. How it works A form trigger is used to dynamically select a database/table from which to build the n8n form from. the table's schema is imported into the workflow and using the code node, is converted into the n8n form fields schema. This let's us dynamically build the fields in our n8n form when we choose to define the form using the JSON option. Once the n8n form submits, we convert the values back into our table's API schema so that we can create a new row. Note any files/attachments fields are removed as they need to be handled separately. Files are processed separately as they may first need to be stored. Once complete, the reference is saved into the newly created row. Check out the example Airtable here - https://airtable.com/appfP15Xd0aVZR9xV/shrGFgXLyQ4Jg58SU How to use The n8n form is autogenerated which means you only need provide access to the table. Using this approach, this template can be reused for any number of Airtable and/or Baserow tables. Requirements You'll need either an Airtable account or a Baserow account to use this template. Accessible n8n instance to your users Customising this workflow Not using either Airtable or Baserow? Theoretically any datastore which provides a fields schema can be used with this template. If you're feeling creative, split the table into multiple forms for a better user experience.

JimleukBy Jimleuk
2690

Real estate chatbot with AI property matching and automated calendar scheduling

Description A comprehensive real estate chatbot automation system that handles customer inquiries, property searches, and appointment scheduling through intelligent conversation flows and email processing. How it works? This template creates an end-to-end real estate automation system that handles customer inquiries from initial contact through appointment booking. Customer Entry Point Webhook receives customer messages from chat interface Link detection checks if customer shared property URLs Smart routing - if property link found, fetch details immediately; otherwise proceed to chat AI Content Processing Content filter (PRIORITY) - blocks non-real estate queries upfront Information extraction - scans messages for personal details and property requirements Human handoff detection - identifies requests for live agent assistance Data Collection Phase Sequential gathering: Personal info (name β†’ phone β†’ email) then property needs Smart validation - phone format, email structure, budget parsing No redundancy - never asks for information already provided PostgreSQL storage - saves customer data and conversation memory Property Search & Matching Database query filters properties by type, location, budget, availability Image enhancement - fetches property photos from media storage Results ranking - returns top 5 matches sorted by price AI Response Generation GPT-4 formatting creates engaging, professional property listings Visual enhancement - includes property images and key details Personalized tone - acknowledges customer preferences Appointment Automation Gmail monitoring - checks for appointment confirmations every hour Calendar integration - creates, updates, deletes appointments automatically Smart scheduling - checks availability, suggests alternatives for conflicts Email responses - sends confirmations and follow-ups Intelligence Features Context Awareness Remembers conversation history across sessions Builds complete customer profile progressively Maintains property preferences throughout interaction Smart Extraction Recognizes property types: HDB, Condo, Apartment Parses locations and MRT preferences automatically Handles various budget formats (SGD 2,500, $2500, etc.) Identifies timeline requirements and citizenship status Professional Handoffs Detects human agent requests with keyword matching Collects complete customer context before transfer Sends structured handoff emails with all requirements Ensures smooth transition to live agents Technical Components AI Models OpenAI GPT-4 - Main conversation handling and response formatting GPT-4 Mini - Appointment processing and email management LangChain Memory - Conversation context retention Database Integration PostgreSQL - Customer data, property listings, conversation history Property search with multi-criteria filtering Media storage integration for property images Communication Channels Webhook API - Primary chat interface Gmail integration - Appointment confirmations and notifications Google Calendar - Automated scheduling and availability checking Setup Requirements Configure database - PostgreSQL with property and customer tables Set up integrations - Gmail, Google Calendar, OpenAI API Customize prompts - Adjust AI responses for your brand Test workflow - Verify end-to-end functionality Monitor performance - Track conversation success rates The system is designed to handle the complete customer journey from initial inquiry to scheduled property viewing, with intelligent automation reducing manual work while maintaining high service quality.

GenziBy Genzi
2571

Automate cryptocurrency funding fee tracking with Binance API and Airtable

Video Guide I prepared a detailed guide that showed the whole process of integrating the Binance API and storing data in Airtable to manage funding statements associated with tokens in a wallet. [](https://youtu.be/GBZRduOzOzg) Youtube Link Who is this for? This workflow is ideal for developers, financial analysts, and cryptocurrency enthusiasts who want to automate the process of managing funding statements and token prices. It’s particularly useful for those who need a systematic approach to track and report funding fees associated with tokens in their wallets. What problem does this workflow solve? Managing funding statements and token prices across multiple platforms can be cumbersome and error-prone. This workflow automates the process, allowing users to seamlessly fetch funding fees from Binance and record them alongside token prices in Airtable, minimizing manual data entry and potential discrepancies. What this workflow does This workflow integrates the Binance API with an Airtable database, facilitating the storage and management of funding statements linked to tokens in a wallet. The agent can: Fetch funding fees and current positions from Binance. Aggregate data to create structured funding statements. Insert records into Airtable, ensuring proper linkage between funding data and tokens. API Authentication: The workflow establishes authentication with the Binance API using a Crypto Node to handle API keys and signatures, ensuring secure and verified requests. Data Collection: It retrieves necessary data, including funding fees and current positions with properly formatted API requests to ensure seamless communication with Binance. Airtable Integration: The workflow inserts aggregated funding statements and token data into the corresponding Airtable records, managing token existence checks to avoid duplicate entries. Setup Set Up Airtable Database: Create an Airtable base with tables for Funding Statements and Tokens. Generate Binance API Key: Log in and create an API key with appropriate permissions. Set Up Authentication in N8N: Utilize a Crypto Node for Binance API authentication. Configure API Request to Binance: Set request method and headers for communication with the Binance API. Fetch Funding Fees and Current Positions: Retrieve funding data and current positions efficiently. Aggregate and Create Statements: Aggregate data to create detailed funding statements. Insert Data into Airtable: Input the structured data into Airtable and manage token records. Using Get Price Node: Implement a Get Price Node to maintain current token price tracking without additional setup.

Mark ShcherbakovBy Mark Shcherbakov
2033

Comprehensive legal department automation with OpenAI O3 CLO & specialist agents

CLO Agent with Legal Team Description Navigate legal complexities with an AI-powered Chief Legal Officer (CLO) agent orchestrating specialized legal team members for comprehensive legal operations and risk management. Overview This n8n workflow creates a comprehensive legal department using AI agents. The CLO agent analyzes legal requirements and delegates tasks to specialized agents for contract management, compliance, intellectual property, privacy law, corporate governance, and employment law. ⚠️ IMPORTANT DISCLAIMER: These AI agents provide legal information and templates, NOT legal advice. Always consult qualified legal professionals for binding legal matters. This workflow does not create attorney-client privilege or provide professional legal liability coverage. Building Blocks Approach This workflow provides foundational AI agents as building blocks for your legal operations. Feel free to: Customize agent prompts to match your industry and legal requirements Add relevant legal tools and integrations (contract management, compliance platforms) Modify specialist focus areas based on your specific legal needs Integrate with legal research databases and document management systems Adjust the CLO's strategic oversight to align with your risk tolerance Features Strategic CLO agent using OpenAI O3 for complex legal strategy and risk assessment Six specialized legal agents powered by GPT-4.1-mini for efficient execution Complete legal lifecycle coverage from contracts to compliance Automated document generation and review processes Risk assessment and mitigation strategies Intellectual property protection workflows Privacy and data protection compliance Team Structure CLO Agent: Legal strategy and risk management coordination (O3 model) Contract Specialist: Contract drafting, review, negotiation terms, agreement analysis Compliance Officer: Regulatory compliance, legal requirements, audits, risk assessment IP Specialist: Patents, trademarks, copyrights, trade secrets, IP protection Privacy Lawyer: GDPR, CCPA, data privacy policies, data protection compliance Corporate Lawyer: Corporate governance, M&A, securities law, business formation Employment Lawyer: Employment contracts, workplace policies, labor law, HR legal issues How to Use Import the workflow into your n8n instance Configure OpenAI API credentials for all chat models Deploy the webhook for chat interactions Send legal requests via chat (e.g., "Draft a software licensing agreement") The CLO will analyze and delegate to appropriate specialists Receive comprehensive legal deliverables and risk assessments Use Cases Contract Lifecycle Management: Draft β†’ Review β†’ Negotiate β†’ Execute β†’ Monitor Compliance Programs: Policy creation β†’ Risk assessment β†’ Audit preparation IP Protection Strategy: Patent applications β†’ Trademark registration β†’ Copyright notices Privacy Compliance: GDPR assessments β†’ Privacy policies β†’ Data mapping exercises Corporate Governance: Board resolutions β†’ Shareholder agreements β†’ Corporate bylaws Employment Law: Policy manuals β†’ Contract templates β†’ Dispute resolution procedures Legal Document Automation: Template creation β†’ Review workflows β†’ Version control Risk Assessment: Legal risk evaluation β†’ Mitigation strategies β†’ Compliance monitoring Requirements n8n instance with LangChain nodes OpenAI API access (O3 for CLO, GPT-4.1-mini for specialists) Webhook capability for chat interactions Optional: Integration with legal management tools (contract management systems, legal research databases) Legal Scope & Limitations This AI workflow provides: βœ… Legal document templates and frameworks βœ… Compliance checklists and procedures βœ… Risk assessment methodologies βœ… Legal research summaries and insights This AI workflow does NOT provide: ❌ Legal advice or professional legal counsel ❌ Attorney-client privilege protection ❌ Court representation or litigation support ❌ Professional legal liability coverage ❌ Jurisdiction-specific legal opinions Cost Optimization O3 model used only for strategic CLO decisions and complex legal analysis GPT-4.1-mini provides 90% cost reduction for specialist document tasks Parallel processing enables simultaneous legal workstream execution Template library reduces redundant legal document generation Integration Options Connect to contract management systems (DocuSign, PandaDoc, ContractWorks) Integrate with legal research databases (Westlaw, LexisNexis) Link to compliance management platforms (GRC tools, audit systems) Export to document management systems (SharePoint, Box, Google Drive) Performance Metrics Contract cycle time reduction and accuracy Compliance audit success rates Legal risk identification and mitigation effectiveness Document review efficiency and consistency Cost per legal matter and resource utilization Contact & Resources Website: nofluff.online YouTube: @YaronBeen LinkedIn: Yaron Been Tags LegalTech ContractAutomation ComplianceTech LegalAI LegalOps IntellectualProperty PrivacyLaw CorporateLaw EmploymentLaw LegalInnovation n8n OpenAI MultiAgentSystem LegalDocument RiskManagement LegalStrategy

Yaron BeenBy Yaron Been
1539

Create stunning AI images directly from WhatsApp with Gemini

πŸ“±πŸ€– Create Stunning AI Images Directly from WhatsApp with Gemini This workflow transforms your WhatsApp into a personal AI image generation studio. Simply send a text message with your idea, and this bot will use the advanced prompt engineering capabilities of Gemini 2.5 Pro to craft a detailed, artistic prompt. It then uses Gemini 2.0 Flash to generate a high-quality image from that prompt and sends it right back to your chat. It's a powerful yet simple way to bring your creative ideas to life, all from the convenience of your favorite messaging app\! What this workflow does Listens for WhatsApp Messages: The workflow starts automatically when you send a message to your connected WhatsApp number. Enhances Your Idea with AI: It takes your basic text (e.g., "a knight on a horse") and uses Gemini 2.5 Pro to expand it into a rich, detailed prompt perfect for image generation (e.g., "A cinematic, full-body shot of a stoic knight in gleaming, ornate silver armor, riding a powerful black warhorse through a misty, ancient forest. The scene is lit by ethereal morning sunbeams piercing the canopy, creating dramatic volumetric lighting and long shadows. Photorealistic, 8K, ultra-detailed, award-winning fantasy concept art."). Generates a Unique Image: It sends this enhanced prompt to the Google Gemini 2.0 Flash image generation API. Prepares the Image: The API returns the image in Base64 format, and the workflow instantly converts it into a binary file. Sends it Back to You: The final, high-quality image is sent directly back to you in the same WhatsApp chat. Nodes Used 🟒 WhatsApp Trigger: The entry point that listens for incoming messages. 🧠 LangChain Chain (LLM): Uses Gemini 2.5 Pro for advanced prompt engineering. ➑️ HTTP Request: Calls the Google Gemini 2.0 Flash API to generate the image. πŸ”„ Convert to File: Converts the Base64 image data into a sendable file format. πŸ’¬ WhatsApp: Sends the final image back to the user. Prerequisites To use this workflow, you will need: An n8n instance. A WhatsApp Business Account connected to n8n. You can find instructions on how to set this up in the n8n docs. A Google Gemini API Key. You can get one for free from Google AI Studio. How to use this workflow Get your Google Gemini API Key: Visit the Google AI Studio and create a new API key. Configure the Gemini 2.5 Pro Node: In the n8n workflow, select the Gemini 2.5 Pro node. Under 'Connect your account', click 'Create New' to add a new credential. Paste your Gemini API key from the previous step and save. Configure the Generate Image (HTTP Request) Node: Select the Generate Image node. In the properties panel on the right, find the Query Parameters section. In the 'Value' field for the key parameter, replace "Your API Key" with your actual Google Gemini API Key. Connect WhatsApp: Select the WhatsApp Trigger node. Follow the instructions to connect your WhatsApp Business Account credential. If you haven't created one, the node will guide you through the process. Activate and Test: Save the workflow using the button at the top right. Activate the workflow using the toggle switch. Send a message to your connected WhatsApp number (e.g., "A futuristic city in the style of Van Gogh"). The bot will process your request and send a stunning AI-generated image right back to you\!

Harsh ManiyaBy Harsh Maniya
1433

Capture website form submissions to Notion CRM database

⚑️ How It Works This workflow captures form submissions from your website, formats the data, and automatically creates a new entry in your Notion CRM database. It eliminates manual copy-pasting and keeps your leads or requests organised in one place. πŸ›  Setup Steps Webhook Node β€’ Create a webhook in n8n. β€’ Connect your website form to POST submissions to this webhook URL. Code Node β€’ Formats the incoming data to match your Notion database structure. β€’ You can customise the fields in the code to suit your specific form inputs. Notion Node (Create Page) β€’ Connect your Notion account. β€’ Choose your target database. β€’ Map each field from the Code node output to your Notion database properties. Test β€’ Submit a test form entry. β€’ Confirm the data appears correctly in Notion. βΈ» πŸ‘₯ Who It’s For βœ… Freelancers collecting project inquiries βœ… Agencies managing client onboarding forms βœ… Business owners wanting organised lead capture βœ… Teams that use Notion as their central CRM or task manager βœ… Anyone tired of manually transferring form data into Notion

David OlusolaBy David Olusola
1138

Receive updates on form submission in Mautic and send SMS notification

No description available.

Harshil AgrawalBy Harshil Agrawal
1090