Skip to main content

Automated MySQL to Google Sheets sync with duplicate prevention

Workflow preview

Workflow preview
100%
Automated MySQL to Google Sheets sync with duplicate prevention preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Sync MySQL Rows to Google Sheet Description: This n8n template automates the process of syncing new records from a MySQL database table into a Google Sheet, ideal for reporting, backup, or light...

Best for

  • Engineering automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.mysql, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.noop, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Ahmed Saadawi.

Original n8n.io source

1.1 Workflow description

Title
Automated MySQL to Google Sheets sync with duplicate prevention
Workflow name
Automated MySQL to Google Sheets sync with duplicate prevention

📝 Sync MySQL Rows to Google Sheet

Description:

This n8n template automates the process of syncing new records from a MySQL database table into a Google Sheet, ideal for reporting, backup, or lightweight dashboards.

It is designed for teams or individuals who need to periodically export new data rows from a custom database (e.g., CRM, registrations, surveys) into a structured Google Sheet for further analysis, sharing, or archiving—without duplicates.


🛠️ What This Workflow Does:

  • Runs every 15 minutes via a schedule trigger.
  • Selects unsynced rows (sync = 0) from a MySQL table (fifa25_customers).
  • Checks if records exist to prevent unnecessary writes.
  • Appends records to a Google Sheet, mapping fields like name, email, phone, gender, and more.
  • Updates the MySQL table to mark those rows as synced (sync = 1) to avoid reprocessing.
  • Fully annotated using sticky notes for easier understanding and onboarding.

📋 Setup Instructions:

  1. Create or select a Google Sheet and make sure the columns match the following:

    • id, name, phone, birthdate, email, region, gender, datatime
  2. Ensure your MySQL table (fifa25_customers) has a sync column (default = 0 for new rows).

  3. Connect your MySQL and Google Sheets credentials inside n8n.

  4. (Optional): Add custom filtering or column transformations as needed.


👤 Who Is It For?

  • Marketers syncing leads to a spreadsheet
  • Ops teams pulling user data from internal tools
  • Analysts logging form submissions or customer data
  • Anyone needing lightweight scheduled ETL from MySQL to Sheets

🔐 Credentials Required:

  • MySQL
  • Google Sheets OAuth2

Best Practices Followed:

  • Uses IF node to prevent unnecessary processing
  • Updates source database to avoid duplicates
  • Includes sticky notes for clarity
  • All columns are explicitly mapped
  • Works out-of-the-box on any n8n instance with proper creds

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Select rows from a table

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 2 - Append row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 3 - Update rows in a table

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Schedule Trigger Every n Mins

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 6 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - No Operation, do nothing

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 8 - Check if new record returned

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automated MySQL to Google Sheets sync with duplicate prevention
Complexity intermediate
Nodes 9
Categories Engineering
Author Ahmed Saadawi
Published 22 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6261/6261.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automated MySQL to Google Sheets sync with duplicate prevention do?

Sync MySQL Rows to Google Sheet Description: This n8n template automates the process of syncing new records from a MySQL database table into a Google Sheet, ideal for reporting, backup, or light...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.