MySQL Automation Workflows
44 ready-made MySQL workflows for n8n, Make, Zapier, Activepieces, and Pipedream. MySQL-driven workflows: sync rows, run queries, react to data changes.
Natural Language SQL Queries with OpenAI and MySQL
Transform natural language questions into SQL queries using OpenAI's GPT and execute them on your MySQL database. Ideal for users who want to interact with databases without writing SQL.
n8n$4.99Automate Compliance Report Collection with Google Forms, Drive, and MySQL
This n8n workflow streamlines the process of collecting compliance reports submitted via Google Forms. It archives uploaded documents in Google Drive and logs submission metadata into a MySQL database, ensuring efficient storage and easy retrieval.
n8n$4.99Automate MySQL to Google Sheets Data Sync with Duplicate Prevention
This n8n workflow automates the synchronization of new records from a MySQL database to a Google Sheet every 15 minutes, ensuring no duplicates are transferred.
n8n$9.99AI-Powered Chatbot Workflow with MySQL Database Integration
# AI-Powered Chatbot Workflow with MySQL Integration This guide shows you how to deploy a chatbot that lets you query your database using natural language. You will build a system that accepts chat messages, retains conversation history, constructs dynamic SQL queries, and returns responses generated by an AI model. By following these instructions, you will have a working solution that integrates n8n's AI Agent capabilities with MySQL. --- ## Prerequisites Before you begin, ensure that you have the following: 1. An active n8n instance (self-hosted or cloud) running version 1.50.0 or later. 2. Valid MySQL credentials configured in n8n. 3. API credentials for the Groq Chat Model (or your preferred AI language model). 4. Basic familiarity with SQL and n8n node concepts such as chat triggers and memory buffers. 5. Access to the [n8n Docs on AI Agents](https://docs.n8n.io/advanced-ai/) for further reference. --- ## Workflow Setup ### 1. Chat Interface & Trigger - **When Chat Message Received**: This node listens for incoming chat messages via a webhook. When a message arrives, it triggers the workflow immediately. ### 2. Conversation Memory - **Chat History**: This memory buffer node stores the last 10 interactions. It supplies conversation context to the AI Agent, ensuring that responses consider previous messages. ### 3. AI Agent Core - **AI Agent (Tools Agent)**: The AI Agent node orchestrates the conversation by receiving the chat input and conversation history. It dynamically generates SQL queries based on your requests and coordinates calls to external tools (such as MySQL nodes). ### 4. Database Interactions - **MySQL Node**: This node executes the SQL query generated by the AI Agent. You reference the query using an expression (e.g., `{{$node["AI Agent"].json["sql_query"]}}`), allowing the agent's output to control data retrieval. - **MySQL Schema Node**: This node retrieves a list of base tables from your MySQL database (excluding system schemas). The agent uses this information to understand the available tables. - **MySQL Definition Node**: This node fetches detailed metadata (such as column names, data types, and relationships) for a specific table. The table and schema names are supplied dynamically by the AI Agent. ### 5. Language Model Processing - **Groq Chat Model**: This node connects to the Groq Chat API to generate text completions. It processes the combined input (chat message, context, and data fetched from MySQL) and produces the final response. ### 6. Guidance & Customization - **Sticky Notes**: These nodes provide guidance on: - Switching the chat model if you wish to use another provider (e.g., OpenAI or Anthropic). - Adjusting the maximum token count per interaction. - Customizing the SQL queries and the context window size. They help you modify the workflow to suit your environment and requirements. ### Workflow Connections - The **Chat Trigger** passes the incoming message to the **AI Agent**. - The **Chat History** node supplies conversation context to the AI Agent. - The **AI Agent** calls the MySQL nodes as external tools, generating and sending dynamic SQL queries. - The **Groq Chat Model** processes the consolidated input from the agent and outputs the natural language response delivered to the user. ### Testing the Workflow 1. Send a chat message using the chat interface. 2. Observe how the AI Agent processes the input and generates a corresponding SQL query. 3. Verify that the MySQL nodes execute the query and return data. 4. Confirm that the Groq Chat Model produces a coherent natural language response. 5. Refer to the sticky notes for guidance if you need to fine-tune any node settings. --- ## Next Steps and References - **Customize Your AI Model**: Replace the Groq Chat Model with another language model (such as the OpenAI Chat Model) by updating the node credentials and configuration. - **Enhance Memory Settings**: Adjust the Chat History node's context window to retain more or fewer messages based on your needs. - **Modify SQL Queries**: Update the SQL queries in the MySQL nodes to match your specific database schema and desired data. - **Further Reading**: Consult the [n8n Docs on AI Agents](https://docs.n8n.io/advanced-ai/) for additional details and examples to expand your workflow's capabilities. - **Set Up a Website Chatbot**: Copy & Paste and replace the placeholders in the following code to embed the chatbot into your personal or company's website: [View in CodePen](https://codepen.io/olemai/pen/RNwPdVp) --- By following these steps, you will deploy a robust AI chatbot workflow that integrates with your MySQL database, allowing you to query data using natural language.
n8n$9.99Store Gmail Email Details in MySQL Database
## This workflow processes emails received in Gmail and saves detailed information about each email to a MySQL database. ### Before using, you need to have: - Gmail credentials - MySQL database credentials - A table in your database with the following columns: - messageId (Gmail message ID) - threadId - snippet - sender_name (nullable) - sender_email - recipient_name (nullable) - recipient_email - subject (nullable) ### How it works: - The Gmail Trigger listens for new emails (checked every minute). - A Code Node extracts the following fields from each email: - Sender's name and email - Recipient's name and email - The MySQL Node inserts the extracted data into your database. - If an entry with the same sender email already exists, it updates the record with the new details. ### How to use: - Make sure your database table has all required columns listed above. - Select the appropriate table and configure the matching column (e.g., id) to avoid duplicates. ### Customizing this Workflow: - You can further modify the workflow to store attachments, timestamps, labels, or any other Gmail metadata as needed.
n8n$4.99Automatically Store Gmail Contacts in MySQL Database
This workflow captures sender information from Gmail emails and stores it in a MySQL database, ensuring you maintain an up-to-date contact list.
n8n$4.99Automate PostgreSQL & MySQL Management on Linux Servers
This n8n workflow automates the installation, configuration, and management of PostgreSQL and MySQL databases on Linux servers, enabling efficient setup, creation, and deletion of databases with user access in just 10 seconds.
n8n$9.99Complete LAMP Stack (Linux, Apache, MySQL, PHP) Automated Server Setup
This automated n8n workflow enables the rapid setup of a complete LAMP (Linux, Apache, MySQL, PHP) stack on a Linux server, executing the entire process in approximately 10 seconds. It configures the server, installs necessary components, and sets up a development user for seamless operation. ## Fundamental Aspects - **Start** - Initiates the workflow - **Set Parameters** - Configures server parameters - **System Preparation** - Prepares the system for LAMP installation - **Update System** - Updates the system and installs essential packages - **Install Apache** - Sets up the Apache web server - **Install MySQL** - Installs MySQL and phpMyAdmin - **Install PHP & Extensions** - Installs PHP with required extensions - **Install Development Tools** - Adds development utilities - **Create Development User** - Creates a dedicated user for development - **Final Setup & Configuration** - Finalizes configurations - **Setup Completion** - Provides a summary of the setup ## Setup Instructions - Import the workflow into n8n - Configure parameters in the Set Parameters node - Run the workflow - Verify the LAMP stack setup on the server ## Required Resources - Linux server with SSH access - Root-level administrative privileges ## Features - Install Database Server - Deploys MySQL with phpMyAdmin - Configure Web Server - Sets up Apache for web hosting - Install PHP - Includes PHP with essential extensions - Create Development User - Establishes a user for development tasks ## Parameters to Configure - server_host: Your Linux server IP address - server_user: SSH username (typically root) - server_password: SSH password - php_extensions: List of PHP extensions to install - dev_tools: List of development tools to install - username: Development username - user_password: Password for the development user ## Workflow Actions - Install: Deploys the LAMP stack, configures Apache, MySQL, and PHP - Create User: Sets up a development user with appropriate permissions - Configure: Finalizes server settings and tool installations The workflow automatically manages - Ubuntu/Debian package installation - Service startup and configuration - Web server and database setup - User and permission management - Development tool integration Update the parameters in the Set Parameters node with your server specifics and run the workflow!
n8n$14.99Automate MySQL Data Retrieval via HTTP Webhook
The 'Automate MySQL Data Retrieval via HTTP Webhook' workflow is designed to simplify the process of fetching product data stored in a MySQL database through a webhook. By leveraging the power of n8n, this workflow establishes a seamless connectio...
n8n$18.12Natural Language MySQL Queries via GPT AI Chatbot
Transform natural language questions into SQL queries for MySQL databases using GPT AI in a chat interface. Executes queries securely and remembers conversation context for up to 5 prior questions.
n8n$19.99Automate Data Transfer from MySQL to Google Sheets
Effortlessly transfer selected data from MySQL to Google Sheets, enhancing data accessibility and streamlining management across platforms.
MakeFreeAutomated CSV Processing and MySQL Insertion Workflow
This workflow automates the process of reading a CSV file and inserting its data into a MySQL database.
n8n$18.17Compliance Report Collector: Google Form → Drive + MySQL
Automates compliance report collection from Google Forms, archiving files to Google Drive and logging metadata to MySQL for seamless auditing and storage.
n8n$13.99Automate PostgreSQL & MySQL DB Management on Linux Servers
Automates setup, installation, creation, and deletion of PostgreSQL and MySQL databases on Linux servers via n8n, executing in ~10 seconds with remote access support.
n8n$24.99Import data from MySQL into Google Sheets
Automates weekly queries from a MySQL table (e.g., books) and appends results to Google Sheets for easy analysis.
n8n$5.99Automated MySQL to Google Sheets Sync with Duplicate Prevention
Automates syncing new MySQL records to Google Sheets every 15 minutes, preventing duplicates by checking existence and marking rows as synced.
n8n$12.99AI-Powered Chatbot with MySQL Database Integration
Build a natural language chatbot that queries MySQL databases using AI Agent, with conversation history for contextual responses.
n8n$14.99Create XML Files from MySQL: With & Without Attributes
This workflow fetches random products from a MySQL database and exports them to two XML files—one with a simple structure and one with XML attributes—demonstrating versatile data export techniques.
n8n$11.99Import CSV Data into MySQL Database
This workflow facilitates the seamless transfer of data from a CSV file into a MySQL database, enhancing data management efficiency. It initiates with a manual trigger that allows users to start the process at their convenience. Upon execution, th...
n8n$9.99Automated Purge of N8N Execution History in MySQL
This workflow automates the deletion of N8N execution history older than 30 days from a MySQL database.
n8n$14.99Select data from MySQL and add it as a new row in Google Sheets
A ready-to-use Make workflow that connects Mysql, Google-sheets. Select data from MySQL and add it as a new row in Google Sheets. Customize and deploy in minutes.
Make$2.99Purge n8n MySQL Execution History Older Than 30 Days
Automates daily cleanup of n8n execution history from MySQL, deleting entries older than 30 days to prevent database bloat from frequent workflows.
n8n$4.99Automate MySQL Data Purging with Cron Scheduling
This workflow automates the deletion of old execution records from a MySQL database using a scheduled cron job.
n8n$11.67Automated MySQL Table Creation and Data Insertion Workflow
This workflow automates the process of creating a MySQL table and inserting specified data, streamlining event management tasks.
n8n$19.17
More integrations
Need a custom MySQL workflow?
Our automation experts build tailored MySQL integrations for your exact stack.
Request a Custom Workflow