Use this powerful n8n workflow to automatically extract sender information from incoming Gmail emails and upsert (insert or update) contacts into a MySQL database. Build robust mailing lists easily using this n8n template.
Download this n8n workflow template and start using it instantly.
Manually logging new client or prospect contact details from incoming emails is time-consuming and error-prone. This specialized n8n workflow solves this inefficiency by automating the entire process. By utilizing a robust n8n node configuration, the system automatically captures sender names and email addresses from every new email received via the n8n trigger. The key benefit of this n8n automation is its use of the MySQL 'upsert' operation, ensuring that contacts are added only once (based on the unique email address) and updated if their details change. This n8n template is essential for anyone who values maintaining an accurate, real-time database of their email contacts.
This automation initiates with the primary n8n trigger, the Gmail Trigger n8n node, which checks for new emails every minute.
null.To set up this powerful n8n workflow, follow these steps:
contacts) in your MySQL database. This table must have an email column set as UNIQUE and a name column that allows NULL values.contacts), the 'Column To Match On' is set to email, and the 'Values To Send' includes the name column mapping to the extracted {{ $json.name }}. Receive Email (Gmail Trigger n8n node):
Function: Serves as the starting n8n trigger, initiating the n8n workflow upon receipt of new emails.
Key Configuration: Polls for new messages using an 'everyMinute' setting.
Extract Client Name and Email (Code n8n node):
Function: Processes the raw 'From' field from the Gmail payload using custom JavaScript to extract clean, usable name and email variables.
Key Configuration: Uses a regex-like split operation to handle the standard email header format, ensuring data quality before database insertion.
Insert New Client in MySQL (MySQL n8n node):
Function: Handles the final data storage operation, performing an efficient 'upsert' to manage existing contacts and insert new ones.
Key Configuration:
Operation: upsert.
Table: contacts (or your defined table).
ColumnToMatchOn: email (ensures uniqueness and handles updates).
* ValueToSend: Maps the extracted name to the database name column.
Use this powerful n8n workflow to automatically monitor multiple website URLs. Receive instant email alerts and log downtime status in Google Sheets using this effective n8n node sequence. Perfect for site reliability engineers.

This powerful n8n workflow automates the entire video creation process, utilizing Deepseek for scripts, ElevenLabs for voice, custom image generation, and automated YouTube publishing. Discover advanced n8n templates for content scaling.

Set up reliable devops monitoring with this essential n8n workflow. Get instant Gmail notifications when any connected n8n workflow fails, detailing the error and execution data.

Use this powerful n8n workflow to automatically add travel time blockers to your Google Calendar before appointments, ensuring punctuality using an AI Agent and the Google Directions API. Explore advanced n8n templates.

Automate watermarking photos sent to your Telegram bot using ImageKit.io. This complete n8n workflow template handles file download, processing, and delivery.









































