Read all data inside a google sheet and pass it all to MySQL Database

Hi Team,

Is it possible to read all data inside a google sheet and pass it all to MySQL Database? If it’s possible, can you provide a sample setup?


Hi @daniel.o, welcome to the community!

This should be fairly straightforward. Assuming both your Google Sheet and MySQL table have identical column names you can simply connect the Google Sheet node (reading your data) to the MySql node (inserting your data).

If the columns don’t match exactly you’d need to add a Rename Keys or Set node to the mix. Here’s an example workflow:

This workflow will read a Google Sheet like below, then rename the columns to match the columns in my database.


The MySQL node will return the result following the insert operation:

Thank you for this response. Forgive me, what I want to accomplish is read all data inside a google sheet, delete a table from database and re-create that table and add all data to that table?

This should work pretty similar to the above. Simply add additional MySQL nodes at the start of your workflow running the queries dropping your existing table and creating a new one.

Can you give me a sample query. I’ve tried it my own but not working after executing the node.

Which problem exactly are you seeing?

Wait let me create a recording

I don’t know why but it keeps on loading. Here is the video recording link:

Can you just provide a sample setup?

Here’s the recording that I received the successful message after execution of the query dropping the table but as I take a look at the database, the table is still not deleted at all.

Hey, so I just tested this on my end using the following docker compose environment:

version: '3.1'
    image: n8nio/n8n:0.197.1
      - 5678:5678
      - ./n8n_data:/home/node/.n8n

      - 3306:3306
      - ./mysql_data:/var/lib/mysql

    image: adminer
      - 8080:8080

This is my current database content:

This is the workflow I am executing:

This is the database content after the workflow execution:

As you can see the users table I was using for testing purposes is gone.

So it very much seems the reason this doesn’t work on your side would be with your specific environment. Perhaps missing permissions to drop a table? Might be worth investigating this with your database admin.

Thank you, my flow is now fully working. Just one question, does n8n have email scraping?

Hi @daniel.o, glad to hear this is working, thanks for confirming! Looks like your latest question is a duplicate of Email Scraping in n8n, so I’ll close this thread over here.