AutomationFlowsData & Sheets › Import CSV to MySQL

Import CSV to MySQL

Original n8n title: Import CSV Into Mysql

Import Csv Into Mysql. Uses manualTrigger, readBinaryFile, spreadsheetFile, mySql. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexity4 nodesRead Binary FileSpreadsheet FileMySQL
Data & Sheets Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "aecce7a8-24f6-48c0-a7f0-f48a421d1d8c",
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        540,
        400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "66822f20-83a9-4272-920c-5d8c9140f912",
      "name": "Read From File",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        740,
        400
      ],
      "parameters": {
        "filePath": "/home/node/.n8n/concerts-2023.csv"
      },
      "typeVersion": 1
    },
    {
      "id": "9b469774-7c1d-41a3-9bfe-18fc3527f96e",
      "name": "Convert To Spreadsheet",
      "type": "n8n-nodes-base.spreadsheetFile",
      "position": [
        940,
        400
      ],
      "parameters": {
        "options": {
          "rawData": true,
          "readAsString": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a10bd105-16f7-47c8-b5a0-a5a10e51ae10",
      "name": "Insert into MySQL",
      "type": "n8n-nodes-base.mySql",
      "position": [
        1140,
        400
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "name",
          "value": "concerts_2023_csv"
        },
        "columns": "Date, Band, ConcertName, Country, City, Location, LocationAddress",
        "options": {}
      },
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Read From File": {
      "main": [
        [
          {
            "node": "Convert To Spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Read From File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert To Spreadsheet": {
      "main": [
        [
          {
            "node": "Insert into MySQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Import Csv Into Mysql. Uses manualTrigger, readBinaryFile, spreadsheetFile, mySql. Event-driven trigger; 4 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

This workflow demonstrates how CSV file can be automatically imported into existing MySQL database.

Read Binary File, Spreadsheet File, MySQL
Data & Sheets

Convert Sql Table Into Excel Spreadsheet. Uses manualTrigger, mySql, spreadsheetFile, stickyNote. Event-driven trigger; 5 nodes.

MySQL, Spreadsheet File
Data & Sheets

This workflow demonstrates how easy it is to export SQL query to Excel automatically!

MySQL, Spreadsheet File
Data & Sheets

How to automatically import CSV files into postgres. Uses manualTrigger, readBinaryFile, spreadsheetFile, postgres. Event-driven trigger; 4 nodes.

Read Binary File, Spreadsheet File, Postgres
Data & Sheets

-- Disclaimer: This template is mainly made for self-hosted users who can reach CSV files in their file system. For Cloud users, just replace the first few nodes with your file system of choice, like

Read Binary File, Spreadsheet File, Postgres