Back to Integrations
integrationMySQL node
integrationX (Formerly Twitter) node

MySQL and X (Formerly Twitter) integration

Save yourself the work of writing custom integrations for MySQL and X (Formerly Twitter) and use n8n instead. Build adaptable and scalable Development, Data & Storage, and Marketing workflows that work with your technology stack. All within a building experience you will love.

How to connect MySQL and X (Formerly Twitter)

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

MySQL and X (Formerly Twitter) integration: Create a new workflow and add the first step

Step 2: Add and configure MySQL and X (Formerly Twitter) nodes

You can find MySQL and X (Formerly Twitter) in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure MySQL and X (Formerly Twitter) nodes one by one: input data on the left, parameters in the middle, and output data on the right.

MySQL and X (Formerly Twitter) integration: Add and configure MySQL and X (Formerly Twitter) nodes

Step 3: Connect MySQL and X (Formerly Twitter)

A connection establishes a link between MySQL and X (Formerly Twitter) (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

MySQL and X (Formerly Twitter) integration: Connect MySQL and X (Formerly Twitter)

Step 4: Customize and extend your MySQL and X (Formerly Twitter) integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect MySQL and X (Formerly Twitter) with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

MySQL and X (Formerly Twitter) integration: Customize and extend your MySQL and X (Formerly Twitter) integration

Step 5: Test and activate your MySQL and X (Formerly Twitter) workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from MySQL to X (Formerly Twitter) or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

MySQL and X (Formerly Twitter) integration: Test and activate your MySQL and X (Formerly Twitter) workflow

Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection

Boost Sales with Automated Magento 2 Product and Coupon Notifications
This n8n workflow automatically posts new Magento products & coupons to Telegram while preventing duplicates. Key benefits:

✅ Increase conversions with time-sensitive alerts (creates urgency)

✅ Reduce missed opportunities with 24/7 monitoring

✅ Improve customer engagement through rich media posts

✅ Save hours per week by automating manual posting

Why This Works:

Triggers impulse buys with real-time notifications

Eliminates human error in duplicate posting

Scales effortlessly as your catalog grows

Provides analytics through database tracking

Perfect for e-commerce stores wanting to:

Announce new arrivals instantly

Promote limited-time offers effectively

Maintain consistent social presence

Track performance through MySQL

This workflow automatically:

✅ Detects new products AND coupons in Magento

✅ Prevents duplicate postings with MySQL tracking

✅ Posts rich formatted alerts to Telegram

✅ Runs on a customizable schedule

✨ Key Features
For Products:

Product name, price, and image

Direct store link

Media gallery support

For Coupons:

Coupon code and status

Usage limits (times used/available)

Active/inactive status indicator

Core System:

🔒 MySQL duplicate prevention⏰ 1-hour schedule (customizable)📱 Telegram notifications with Markdown

🛠️ Configuration Guide
Database Setup

CREATE TABLE IF NOT EXISTS posted_items (item_id INT PRIMARY KEY, item_type ENUM('product', 'coupon') NOT NULL, item_value VARCHAR(255), posted BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);

Required Credentials

Magento API (HTTP Header Auth)

MySQL Database

Telegram Bot
Sticky Notes

`❗ IMPORTANT SETUP NOTES ❗

For products: Ensure 'url_key' exists in custom_attributes

For coupons: Magento REST API must expose coupon rules

MySQL user needs INSERT/SELECT privileges

Telegram bot must be added to your channel first

🔄 SCHEDULING: - Default: Checks every 1 hours at :00 - Adjust in Schedule Trigger node `

⚙️ Technical Details
Workflow Logic:

Checks for new products/coupons via Magento API

Verifies against MySQL database

Only posts if record doesn't exist

Updates database after successful post

Error Handling:

Automatic skip if product/coupon exists

Empty result handling

Connection timeout protection

🌟 Why This Template?
Complete Solution**: Handles both products AND coupons

Battle-Tested**: Prevents all duplicates reliably

Ready-to-Use**: Just add your credentials

Fully Customizable**: Easy to modify for different needs

Perfect for e-commerce stores using Magento 2 who want automated, duplicate-free social notifications!

Nodes used in this workflow

Popular MySQL and X (Formerly Twitter) workflows

Automatic Magento 2 Product & Coupon Alerts to Telegram with Duplicate Protection

Boost Sales with Automated Magento 2 Product and Coupon Notifications This n8n workflow automatically posts new Magento products & coupons to Telegram while preventing duplicates. Key benefits: ✅ Increase conversions with time-sensitive alerts (creates urgency) ✅ Reduce missed opportunities with 24/7 monitoring ✅ Improve customer engagement through rich media posts ✅ Save hours per week by automating manual posting Why This Works: Triggers impulse buys with real-time notifications Eliminates human error in duplicate posting Scales effortlessly as your catalog grows Provides analytics through database tracking Perfect for e-commerce stores wanting to: Announce new arrivals instantly Promote limited-time offers effectively Maintain consistent social presence Track performance through MySQL This workflow automatically: ✅ Detects new products AND coupons in Magento ✅ Prevents duplicate postings with MySQL tracking ✅ Posts rich formatted alerts to Telegram ✅ Runs on a customizable schedule ✨ Key Features For Products: Product name, price, and image Direct store link Media gallery support For Coupons: Coupon code and status Usage limits (times used/available) Active/inactive status indicator Core System: 🔒 MySQL duplicate prevention⏰ 1-hour schedule (customizable)📱 Telegram notifications with Markdown 🛠️ Configuration Guide Database Setup CREATE TABLE IF NOT EXISTS posted_items (item_id INT PRIMARY KEY, item_type ENUM('product', 'coupon') NOT NULL, item_value VARCHAR(255), posted BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); Required Credentials Magento API (HTTP Header Auth) MySQL Database Telegram Bot Sticky Notes `❗ IMPORTANT SETUP NOTES ❗ For products: Ensure 'url_key' exists in custom_attributes For coupons: Magento REST API must expose coupon rules MySQL user needs INSERT/SELECT privileges Telegram bot must be added to your channel first 🔄 SCHEDULING: - Default: Checks every 1 hours at :00 - Adjust in Schedule Trigger node ` ⚙️ Technical Details Workflow Logic: Checks for new products/coupons via Magento API Verifies against MySQL database Only posts if record doesn't exist Updates database after successful post Error Handling: Automatic skip if product/coupon exists Empty result handling Connection timeout protection 🌟 Why This Template? Complete Solution**: Handles both products AND coupons Battle-Tested**: Prevents all duplicates reliably Ready-to-Use**: Just add your credentials Fully Customizable**: Easy to modify for different needs Perfect for e-commerce stores using Magento 2 who want automated, duplicate-free social notifications!
+2

Automate Twitter Content with Trend Analysis using OpenAI GPT & MCP

How it works This template creates a fully automated Twitter content system that discovers trending topics, analyzes why they're trending using AI, and posts intelligent commentary about them. The workflow uses MCP (Model Context Protocol) with the twitter154 MCP server from MCPHub to connect with Twitter APIs and leverages OpenAI GPT models to generate brand-safe, engaging content about current trends. Key Features: 🔍 Smart Trend Discovery: Automatically finds US trending topics with engagement scoring 🤖 AI-Powered Analysis: Uses GPT to explain "why it's trending" in 30-60 words 📊 Duplicate Prevention: MySQL database tracks posted trends with 3-day cooldowns 🛡️ Brand Safety: Filters out NSFW content and low-quality hashtags ⚡ Rate Limiting: Built-in delays to respect API limits 🐦 Powered by twitter154: Uses the robust "Old Bird" MCP server for comprehensive Twitter data access Set up steps Setup time: ~10 minutes Prerequisites: OpenAI API key for GPT models Twitter API access for posting MySQL database for trend tracking MCP server access**: twitter154 from aigeon-ai via MCPHub Configuration: Set up MCP integration with twitter154 server endpoint: https://api.mcphub.com/mcp/aigeon-ai-twitter154 Configure credentials for OpenAI, Twitter, and MySQL connections Set up authentication for the twitter154 MCP server (Header Auth required) Create MySQL table for keyword registry (schema provided in workflow) Test the workflow with manual execution before enabling automation Set schedule for automatic trend discovery (recommended: every 2-4 hours) MCP Server Features Used: Search Tweets**: Core functionality for trend analysis Get Trends Near Location**: Discovers trending topics by geographic region AI Tools**: Leverages sentiment analysis and topic classification capabilities Customization Options: Modify trend scoring criteria in the AI agent prompts Adjust cooldown periods in database queries Change target locale from US to other regions (WOEID configuration) Customize tweet formatting and content style Configure different MCP server endpoints if needed Perfect for: Social media managers, content creators, and businesses wanting to stay current with trending topics while maintaining consistent, intelligent posting schedules. Powered by: The twitter154 MCP server ("The Old Bird") provides robust access to Twitter data including tweets, user information, trends, and AI-powered text analysis tools.

Build your own MySQL and X (Formerly Twitter) integration

Create custom MySQL and X (Formerly Twitter) workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

MySQL supported actions

Delete
Delete an entire table or rows in a table
Execute SQL
Execute an SQL query
Insert
Insert rows in a table
Insert or Update
Insert or update rows in a table
Select
Select rows from a table
Update
Update rows in a table

X (Formerly Twitter) supported actions

Create
Send a direct message to a user
Add Member
Add a member to a list
Create
Create, quote, or reply to a tweet
Delete
Delete a tweet
Like
Like a tweet
Retweet
Retweet a tweet
Search
Search for tweets from the last seven days
Get
Retrieve a user by username

FAQs

  • Can MySQL connect with X (Formerly Twitter)?

  • Can I use MySQL’s API with n8n?

  • Can I use X (Formerly Twitter)’s API with n8n?

  • Is n8n secure for integrating MySQL and X (Formerly Twitter)?

  • How to get started with MySQL and X (Formerly Twitter) integration in n8n.io?

Need help setting up your MySQL and X (Formerly Twitter) integration?

Discover our latest community's recommendations and join the discussions about MySQL and X (Formerly Twitter) integration.
Mohammadali
Michael Zareno
lexgabrees
Andrey Khokhlov
Neal A Richardson Sr

Looking to integrate MySQL and X (Formerly Twitter) in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate MySQL with X (Formerly Twitter)

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon