What the n8n MySQL Integration Does
The n8n MySQL integration gives your workflows direct access to MySQL databases. You can run SELECT queries to pull data, INSERT and UPDATE rows based on events in other tools, and use database changes as triggers for downstream workflows.
This matters because your database is often the most accurate source of truth in your business. Customer records, order data, product inventory — it all lives in MySQL. n8n automation lets you act on that data without building custom API endpoints or writing backend code.
Unlike standalone database management tools, n8n integrations connect MySQL to the rest of your stack. Pull a row from MySQL, transform it, and push it to Slack, Google Sheets, your CRM, or an email tool — all in one workflow.
3 Workflow Examples That Actually Work
1. New User Onboarding Pipeline
Trigger: A polling trigger checks MySQL every minute for new rows in the users table. When a new user appears, n8n grabs their details, creates a contact in HubSpot, sends a welcome email via SendGrid, posts a notification to the #new-signups Slack channel, and adds a row to a Google Sheet that the marketing team tracks. One database insert kicks off the entire onboarding flow.
2. Inventory Alert System
Trigger: A cron schedule runs every hour. n8n queries MySQL for products where stock_quantity falls below the reorder threshold. For each low-stock item, it sends an alert to the operations team on Slack with the product name, current quantity, and supplier contact. It also updates a reorder tracking sheet to prevent duplicate alerts.
3. Automated Reporting From Production Data
Trigger: A cron schedule fires every Monday at 7 AM. n8n runs aggregation queries against MySQL — total revenue, new signups, active users, churn rate — and compiles the results into a formatted report. It writes the data to Google Sheets and posts a summary to the #leadership Teams channel. Executives get fresh metrics without anyone pulling reports manually.
How to Set It Up
You need your MySQL host, port, database name, and credentials with appropriate permissions. In n8n, create MySQL credentials with these details. If your database is behind a firewall, you'll need to whitelist your n8n instance's IP or use an SSH tunnel.
The MySQL node accepts raw SQL queries, so you have full control over what you read and write. For security, use a dedicated MySQL user with the minimum required permissions — read-only for reporting workflows, read-write only for workflows that need to update data.
Most teams get their first MySQL n8n workflow running in under 20 minutes. The complexity is in the SQL queries and business logic, not the connection setup.
When to DIY vs Hire an Agency
Simple read queries — like pulling a daily count from a table — are easy to build yourself. n8n templates cover basic database-to-spreadsheet and database-to-notification patterns.
Hire an agency when your workflows involve complex joins, transaction safety, large result sets, or write operations that must be idempotent. Database automation done wrong can corrupt data or cause performance issues on production systems. You also want professional help when connecting MySQL to multiple downstream tools with error handling and retry logic.
If your MySQL database is a production system with real users, treat automation workflows with the same care you'd treat application code. That's where experienced n8n workflow builders add the most value.
Unlock Your Database Data
Related guides:
build ETL pipelines with n8n
Your MySQL database holds the data your team needs. n8n integrations make that data accessible to every tool in your stack — automatically and in real time. Stop exporting CSVs and writing one-off scripts. Let your database drive your workflows.
Automate MySQL Without Custom Code
Your database shouldn't be a black box that only developers can access. Goodspeed builds n8n workflows that turn MySQL data into automated actions across your entire tool stack.
Talk to our n8n agency about automating your database workflows.

Harish Malhi
Founder of Goodspeed
Harish Malhi is the founder of Goodspeed, one of the top-rated Bubble agencies globally and winner of Bubble’s Agency of the Year award in 2024. He left Google to launch his first app, Diaspo, built entirely on Bubble, which gained press coverage from the BBC, ITV and more. Since then, he has helped ship over 200 products using Bubble, Framer, n8n and more - from internal tools to full-scale SaaS platforms. Harish now leads a team that helps founders and operators replace clunky workflows with fast, flexible software without writing a line of code.
Frequently Asked Questions (FAQs)
Can n8n read and write to MySQL databases?
Yes. The n8n MySQL node supports SELECT, INSERT, UPDATE, and DELETE operations. You write raw SQL queries, giving you full control over what data you access and modify. You can also use parameterized queries to prevent SQL injection.
How does n8n connect to a remote MySQL database?
You provide the host, port, database name, username, and password in n8n's MySQL credentials. For databases behind firewalls, you can use SSH tunnels. Cloud-hosted MySQL instances (like AWS RDS) work as long as your n8n instance can reach the endpoint.
Can I trigger n8n workflows from MySQL database changes?
n8n doesn't have a native MySQL trigger, but you can use a polling approach. Set a cron trigger to query MySQL periodically for new or updated rows. Track the last processed ID or timestamp to avoid reprocessing. This is reliable for most use cases.
Is it safe to connect n8n to a production MySQL database?
Yes, with precautions. Use a read-only database user for reporting workflows. For write operations, use a dedicated user with minimal permissions. Consider connecting to a read replica instead of the primary database to avoid performance impact on your application.
Can n8n handle large MySQL query results?
n8n can handle moderate result sets, but very large queries (tens of thousands of rows) may cause memory issues. Use LIMIT clauses, pagination, or batch processing in your workflows. For large data migrations, consider dedicated ETL tools instead.
What MySQL versions does n8n support?
n8n supports MySQL 5.7 and later, including MySQL 8.x. It also works with MariaDB, which is API-compatible with MySQL. The connection uses standard MySQL protocol, so most MySQL-compatible databases will work.



