Easy Tech Tuts
n8n

How to Connect Microsoft SQL to n8n Easily 2026

By Impran M N

Connecting Microsoft SQL Server to n8n lets you read and write relational data as part of your automations, without leaving the workflow canvas. This guide covers entering your connection details, choosing between visual operations and raw queries, and testing the connection.

01Add the Microsoft SQL node

Place the node onto your workflow canvas where you need database interaction.

02Enter your connection credentials

Provide your server host, database name, port, username, and password inside n8n's credential manager.

03Choose your operation mode

Decide between visual builder actions for inserting or selecting data, or a raw query editor for custom SQL.

04Map your table and data

Specify the target table and connect incoming JSON data to the correct columns.

05Test the connection

Run the workflow to confirm your query or data insert executes correctly against the database.

FAQ

Frequently asked questions

What details do I need to connect Microsoft SQL to n8n?

You'll need the server host, database name, port, and valid login credentials.

Can I write custom SQL queries instead of using the visual builder?

Yes, the node supports a raw query mode for running custom SQL statements.

Can n8n insert new rows into a SQL Server table?

Yes, you can map incoming data into insert operations targeting a specific table.

Is it safe to store SQL credentials in n8n?

Credentials are kept in n8n's dedicated credential manager, separate from your workflow logic.

Watch the full walkthrough

The same steps, demonstrated on screen from start to finish.