Resources · n8n integration

Microsoft SQL n8n integrationAutomate Microsoft SQL with n8n.

A SQL Server table can feed an automation without a single manual export. The Microsoft SQL n8n integration fits in one node and 4 operations: a free-form query, plus insert, update and delete on a named table. Nothing watches the database, so another trigger starts the run.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Microsoft SQL n8n integration actually do?

One node, n8n-nodes-base.microsoftSql, opens a connection to a Microsoft SQL Server database and runs statements against it. The n8n catalog sums it up as get, add and update data in Microsoft SQL, and splits the work into 4 operations under a single resource: Execute Query, Insert, Update and Delete. A credential, the connection record n8n stores once, holds the server and login details for every workflow that needs them.

Start with the reporting job nobody enjoys. A Schedule Trigger fires at a set hour, Execute Query reads the table that matters, and the rows land in Google Sheets for the people who will never open a SQL client. A workflow, the chain of steps n8n runs one after the other, takes three nodes here. One of the public templates does the same thing into a CSV file.

Second scenario, the other direction. A form, a webhook (a URL n8n exposes that an outside service calls) or another app pushes records into the run, and Insert writes them as new rows. Plenty of teams add a short Slack message behind it so whoever is on duty knows the batch went through.

Third, the table you keep honest. Update rewrites the rows whose key matches the incoming item, so a status coming back from another tool replaces the old value instead of piling up a duplicate. Delete removes the rows a retention rule marks as expired. Both work on one table at a time and both need a key column.

So where does the HTTP Request node fit? Its usual job is calling an API endpoint, an address the tool publishes for programs to call, that a dedicated node leaves out, reusing the same credential. Here the credential is a database connection rather than an API key, so the escape hatch is Execute Query instead: it takes any statement written by hand, n8n expressions included. Everything the three row operations leave out goes through it.

The limits are worth knowing before you build. There is no Microsoft SQL trigger node, the node type that starts a workflow on its own, so nothing reacts to a row appearing in the database. Insert, Update and Delete target one table by name and read their values from the properties of the incoming item, which means those property names have to match the columns. If part of the data lives in another engine, the same page exists for Postgres and for MySQL. And when the question turns into n8n or another platform, the n8n review lays out the criteria.

Connect

How do you connect Microsoft SQL to n8n?

  1. 01

    Create the database account

    It starts on the server side: you need a user account on the Microsoft SQL Server database the automation will touch. The node accepts one authentication method, the SQL database connection, so there is no OAuth screen and no token to renew. The credential is created once from the Credentials menu and then shows up in the dropdown of every workflow that uses the node.

  2. 02

    Fill in the server and the database

    Server expects the host name of the SQL Server, the part sitting before the instance name in HOSTNAME\INSTANCENAME; the Object Explorer pane and the footer of a query window both show it. Database expects the instance name, MSSQLSERVER when none appears anywhere. Then come User, Password and Port, 1433 unless the server says otherwise, plus Domain when several domains reach the same database.

  3. 03

    Set TLS, the timeouts and the TDS version

    TLS turns encryption on, and Ignore SSL Issues lets n8n connect even when certificate validation fails. Connect Timeout and Request Timeout are both written in milliseconds, the second one acting as the ceiling for a single query. TDS Version picks the protocol, with 7_4 covering SQL Server 2012 to 2019; a version the server does not support falls back to a negotiated one.

Actions

What can the Microsoft SQL node do?

The Microsoft SQL node exposes 4 operations. For each one: the node as you configure it in n8n, the required fields, and our field notes.

01

Execute a SQL query

executeQuery

What you see in n8n

Notes & use cases

The statement you write travels as is to the database, and the result comes back as items the rest of the workflow can use.

Key parameters

  • Query: the SQL to execute. n8n expressions work inside it, and $1, $2, $3 point at the values listed in Query Parameters.
  • Query Parameters: a comma-separated list of values, tucked in the Options collection, that fills those placeholders. The field hint recommends them against SQL injection, and the values drag in from the input panel.
Use cases
a count of the previous day's orders sent out every morning, or a lookup that enriches an item before the workflow branches.
02

Insert rows in database

insert

What you see in n8n

Notes & use cases

Every item entering the node becomes a row in the table you name. That is the path a form answer or an API response takes to end up stored.

Key parameters

  • Table: the name of the table receiving the data. Required, so an empty value stops the execution.
  • Columns: the comma-separated list of item properties used as columns, written like id,name,description. Each property listed there needs a column of the same name waiting for it.
Use cases
archiving the answers of a contact form, or keeping the result of an API call so the next run has something to compare against.
03

Update rows in database

update

What you see in n8n

Notes & use cases

Rather than stacking a duplicate, this operation finds the rows already sitting in the table and rewrites the columns you list.

Key parameters

  • Table: the table holding the rows to change.
  • Update Key: the name of the property that decides which rows get updated, id in most schemas. The value comes from the item, so the match happens row by row.
  • Columns: the properties to write, for instance name,description. Only those are touched.
Use cases
sending a delivery status back into an orders table, or refreshing a price read from a supplier feed.
04

Delete rows in database

delete

What you see in n8n

Notes & use cases

A cleanup pass asks for two things: the table, and the property that identifies the rows to remove. The node deletes whatever matches the items it receives.

Key parameters

  • Table: the table to clean up, a required field.
  • Delete Key: the name of the property that decides which rows disappear, usually id. n8n reads its value on each incoming item.
Use cases
pulling test records out after a migration rehearsal, or purging the rows a retention policy has flagged.
Need help

Need help automating Microsoft SQL with n8n?

A person reads every message.

FAQ

Microsoft SQL and n8n: the questions that come next

01Is the Microsoft SQL n8n integration free?
Yes, on the n8n side. The Microsoft SQL node ships with n8n: nothing to install, no extra cost, whether the run happens on n8n Cloud or on an instance you host yourself with Docker or npm, in Community Edition under the Sustainable Use license. A workflow built on one side behaves the same on the other, which matters when the database sits behind a firewall and the instance has to live next to it. What the SQL Server itself costs falls outside this page. The credential is created once and reused everywhere, so the setup time is paid only once.
02What credentials does the Microsoft SQL node need?
One credential, the SQL database connection, and it is the only authentication method the node supports. You first need a user account on the Microsoft SQL Server database. The form asks for the Server, the Database, the User, the Password, the Port, the Domain, whether to use TLS, whether to ignore SSL issues, a Connect Timeout, a Request Timeout and a TDS Version. It is created from the Credentials menu in n8n, and every node then picks it from a dropdown. No OAuth screen, no token to refresh, and a second workflow reuses it without retyping anything.
03What are the limits of the Microsoft SQL node?
It depends on what you expect from it. The node exposes 4 operations on a single resource: Execute Query, Insert, Update and Delete. The three row operations target one table named in the parameters and draw their values from the properties of the incoming items, so property names have to line up with the columns. Update requires an Update Key, Delete requires a Delete Key, and a required field left empty stops the execution. Everything else goes back through Execute Query, which accepts any statement with n8n expressions inside. There is also no trigger, and the next question covers that.
04Can Microsoft SQL trigger an n8n workflow?
No. n8n has no Microsoft SQL trigger node, so nothing watches the database to react on its own to a new or changed row. The run starts somewhere else: a Schedule Trigger at a fixed interval, the n8n Webhook node giving a URL that an outside service calls, or the trigger of another tool already wired in. The Microsoft SQL node then takes over and fires its query at that moment. In practice, a Schedule Trigger followed by an Execute Query that looks for the rows changed since the last pass is the closest thing to watching a table.
05n8n or Make for Microsoft SQL?
It comes down to four criteria, and neither tool is wrong. Hosting first: Make runs only on its own servers, while n8n runs on its Cloud or on an instance you host with Docker or npm. Data control follows from that, and it weighs a lot when the database credential and the rows never have to leave the network you already run. Then the cost model: Make bills per operation, which shows up fast on a workflow that writes rows one by one. Visual logic closes the list, and that one is mostly a matter of habit. Try the same query on both before deciding.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.