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

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

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.


Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free