Automate MySQL to Google Sheets Data Export with n8n Cron

This workflow streamlines exporting data from a MySQL database to Google Sheets automatically every week using n8n’s Cron trigger. By automating this process, it saves users time and eliminates manual errors in data transfer.
cron
mySql
googleSheets
Workflow Identifier: 2411
NODES in Use: Cron, MySQL, Google Sheets
Automate MySQL to Google Sheets with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow exports all book records from a MySQL database to a Google Sheet every week at 5 AM automatically.
It solves the problem of spending over an hour doing this data copying by hand and avoids mistakes.
You get an always updated Google Sheet without doing this work manually.

The input is the books table data from MySQL.
The process runs a query to fetch data and sends it to Google Sheets for appending.
The output is fresh rows added to the Google Sheet for reporting.


Tools and Services Used

  • n8n Workflow Automation: Coordinates the process.
  • MySQL Database: Stores book data.
  • Google Sheets: Receives the exported data.
  • Cron node in n8n: Schedules weekly runs.
  • OAuth2 Credentials: Provide secure access to Google Sheets.

Who Should Use This Workflow

This automation is good for people who have book data in MySQL and must export it regularly to Google Sheets.
It fits users who want to save time and avoid errors from manual copying.

The workflow is also helpful for those who want scheduled, hands-free data syncing.


Beginner Step-by-Step: How to Use This Workflow in n8n

Download and Import the Workflow

  1. Use the Download button on this page to save the workflow file.
  2. Open the n8n editor.
  3. Choose “Import from File” and select the downloaded workflow.

Configure Credentials and IDs

  1. Add your MySQL credentials in the n8n credentials manager.
  2. Set up Google Sheets OAuth2 credentials with access to the target sheet.
  3. Update the Google Sheet ID in the Google Sheets node to your specific sheet.

Test the Workflow

  1. Run the workflow manually inside n8n.
  2. Check Google Sheets to confirm book data is added.

Activate for Production

  1. Enable the workflow to run automatically as scheduled.
  2. Monitor future runs in n8n executions panel.

If self hosting n8n, see self-host n8n for help.


Inputs, Processing, and Outputs

Inputs

  • Books data from MySQL database table called books.
  • Scheduled trigger time at 5 AM weekly.

Processing Steps

  • Cron node triggers the workflow weekly.
  • MySQL node runs the SQL query SELECT * FROM books;.
  • The data output from MySQL node is passed to the Google Sheets node.
  • Google Sheets node appends this data as new rows in the configured sheet.

Outputs

  • New rows appear in Google Sheets with up-to-date books data.
  • This removes manual export and copy-paste.

Common Errors and Solutions

MySQL connection errors

Incorrect credentials or blocked network access can prevent connection.
Confirm credentials and allow access to database from the n8n server IP.

Google Sheets authentication errors

OAuth token expiration or missing permissions cause write failures.
Re-authenticate or update permissions for the Google Sheets OAuth2 connection.


Customization Ideas

  • Modify SQL query inside MySQL node to filter books, for example: SELECT * FROM books WHERE in_stock = 1;
  • Change scheduled time by adjusting hours or day in the Cron node.
  • Add a specific sheet tab or range in Google Sheets node to write data to a set location.

Summary

✓ Saves over an hour every week by automating data export.
✓ Prevents manual errors by handling data transfer automatically.
✓ Keeps Google Sheets always updated with fresh books information.
→ Frees time for more valuable tasks.


Automate MySQL to Google Sheets with n8n

Visit through Desktop to Interact with the Workflow.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.