Templates / Automatically add Gmail sender contacts to MySQL database

Automatically add Gmail sender contacts to MySQL database

Ready for 3.0

by Rosh Ragel ✓ · 690 views · created 2025-07-23 · Lead Generation

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 3 nodes and runs on Gmail events. Along the way it connects MySQL and Gmail.

How it runs

Trigger: On Gmail events.

  1. Extract Client Name and Email (Code): runs custom JavaScript code
  2. Insert New Client in MySQL (MySQL): create or update

Services it uses

MySQLGmail

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Receive Email).

Nodes used (3)

From the author

This workflow processes emails received in Gmail and adds the sender's name and email address to a MySQL database. Use Cases: - A sales or marketing agency can use this to automatically save client contact info to a database to build a list of leads -…

Excerpt from Rosh Ragel's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.