Resources · n8n integration

TimescaleDB n8n integrationAutomate TimescaleDB with n8n.

Your measurements land in TimescaleDB, and your workflow needs to read and write them without a script. The TimescaleDB n8n integration opens a direct database connection and exposes 3 operations: run SQL, insert rows, update rows. No trigger ships with it, so a schedule or an incoming call starts the run.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the TimescaleDB n8n integration actually do?

The TimescaleDB node works as a database client sitting inside your workflow. It signs in with a host, a database name, a user and a password, then speaks SQL to your instance. Three operations cover the ground: Execute Query for any statement you can write yourself, Insert for adding rows, Update for changing rows that already exist. One resource, no sub-objects to pick from.

Start with ingestion, because that is what most builders wire first. A workflow polls a source on a schedule, shapes the payload, and the Insert operation writes one row per item into the table you name. The public n8n template numbered 917 does exactly this with the position of the ISS: an HTTP Request node fetches the reading, the TimescaleDB node stores it. Swap the source and the pattern holds for sensor readings, API counters or price snapshots.

The second pattern is reporting. Execute Query runs your aggregate, the rows come back as items, and the next node does something with them. Push the result into a Slack message when a threshold is crossed, or append it to a sheet through Google Sheets so non-technical people can read the numbers without a database client. The SQL stays in the node, which means the logic is visible to anyone who opens the workflow.

Third comes correction. Rows already written sometimes need a fix: a device gets renamed, a batch was tagged with the wrong label, a status has to move on. The Update operation takes the table plus an Update Key, the column that decides which rows are concerned, and rewrites only the columns you list.

Now the part that differs from most integrations on this site. The TimescaleDB credential opens a connection to a database, with a host, a port and a database name. It is not an HTTP API, so the usual answer of falling back to the HTTP Request node does not apply here. When an operation is missing, the fallback is Execute Query, which accepts any SQL statement you can write. That covers deletes, joins, aggregates, schema work, anything the three named operations leave out.

The known limits are worth stating before you build. There is no TimescaleDB trigger node, so nothing here reacts on its own: a Schedule Trigger at a fixed interval, an n8n Webhook called by another service, or the trigger of another tool has to start the workflow. Required fields block the node when left empty. And because this is the same kind of connection you would open against a Postgres server, the habits you already have from the Postgres or Supabase nodes transfer over. If you are still choosing a platform, the n8n review goes into the hosting and licensing side.

Connect

How do you connect TimescaleDB to n8n?

  1. 01

    Collect the connection details

    You need an available TimescaleDB instance and five values from it: the Host, which is the fully qualified server name or the IP address of your server, the Database to connect to, the User to log in with, the Password for that user, and the Port, the port number your TimescaleDB server listens on. These are the standard connection settings of your instance, not something you generate inside n8n.

  2. 02

    Create the credential once

    In n8n, open the Credentials menu and create a TimescaleDB credential, which is the stored set of connection details the node reuses. A credential, meaning a saved login that workflows share, is created a single time and then offered in the dropdown of every TimescaleDB node you add later. Only one authentication method exists for this node: database connection. There is no API key and no token to rotate.

  3. 03

    Decide how SSL behaves

    The SSL selector controls the ssl-mode of the connection string. Require is the default for TimescaleDB connection strings and only attempts an encrypted connection, verifying that a trusted certificate authority issued the server certificate when a root CA file is present. Allow tries a non-SSL connection first and falls back to SSL. Disable only tries a non-SSL connection.

Actions

What can the TimescaleDB node do?

The TimescaleDB node exposes 3 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

Send any statement you can write to the database and get back whatever it produces. A SELECT returns rows as items; a write statement just runs.

Key parameters

  • Query: the SQL to execute, required. It accepts n8n expressions such as {{ $json.field }}, or the numbered placeholders $1 and $2 used together with query parameters.
  • Query Parameters: in Additional Fields, a comma-separated list of the properties to use as query parameters, written like quantity,price.
  • Mode: also in Additional Fields, the way queries reach the database. multiple, the default, sends several at once, independently executes each on its own, transaction runs them in a single transaction.
Use cases
a scheduled aggregate that reads yesterday's measurements and hands the result to a reporting step.
02

Insert rows in database

insert

What you see in n8n

Notes & use cases

Write the incoming items into a table as new rows, one row per item, without writing the INSERT statement yourself.

Key parameters

  • Schema: required, the name of the schema the table belongs to.
  • Table: required, the name of the table to insert data into.
  • Columns: a comma-separated list of the properties to use as columns for the new rows, for example id,name,description. A column name can carry its data type by appending :type, so id:int,name:text sets int for id and text for name.
  • Return Fields: a comma-separated list of the fields the operation returns.
Use cases
storing each reading a polling workflow collects, the way template 917 records the position of the ISS.
03

Update rows in database

update

What you see in n8n

Notes & use cases

Change rows that already exist instead of adding new ones. The node matches rows on one column and rewrites the columns you list.

Key parameters

  • Update Key: required, the name of the property that decides which rows in the database get updated. Normally that would be id.
  • Schema and Table: both required, the schema the table belongs to and the table to update data in.
  • Columns: a comma-separated list of the properties to use as columns for the rows to update, such as name,description.
  • Return Fields: a comma-separated list of the fields the operation returns.
Use cases
renaming a device across its historical rows after the label changed in your inventory tool.
Need help

Need help automating TimescaleDB with n8n?

A person reads every message.

FAQ

TimescaleDB and n8n: common questions

01Is the TimescaleDB n8n integration free?
Yes on the n8n side. The TimescaleDB node ships with n8n, so there is nothing to install and no extra cost to unlock it. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on a self-hosted instance installed through Docker or npm under the Community Edition and its Sustainable Use license. A workflow built in one runs in the other without changes. What your TimescaleDB instance itself costs is a separate matter and depends on how you run it, which this page does not cover.
02What credentials does the TimescaleDB node need?
One credential type, called database connection. There is no OAuth screen and no API key. You supply the Host, meaning the fully qualified server name or IP address of your TimescaleDB server, the Database to connect to, the User to log in with, the Password for that user, and the Port your server listens on. Two more settings shape the encryption: the SSL selector, which sets ssl-mode to allow, disable or require, and Ignore SSL Issues, which lets n8n connect even when certificate validation fails. Create it once in the Credentials menu and every TimescaleDB node picks it from a dropdown.
03What are the limits of the TimescaleDB node in n8n?
The node exposes 3 operations on a single resource: Execute Query, Insert and Update. That is a deliberately small surface, and the escape hatch is not the one you might expect. Because the credential opens a database connection rather than an HTTP API, the HTTP Request node is not the answer when something is missing here. Execute Query is: it takes any SQL statement, so whatever the two named write operations do not cover, you write yourself. Keep in mind that a field marked required stops the node from running when it is left empty.
04Does the TimescaleDB node react in real time?
It does not react on its own at all. TimescaleDB has no trigger node in n8n, so nothing watches the database for new rows. A workflow that touches TimescaleDB starts somewhere else: a Schedule Trigger firing at a fixed interval, an n8n Webhook, meaning a URL that a third-party service calls when something happens on its side, or the trigger of another tool already in your stack of apps. Once that first node fires, the TimescaleDB node runs its operation in the same execution.
05n8n or Make for TimescaleDB?
It depends on where you want the data and the cost to sit. Make is a hosted automation platform with no self-hosting option, billed per operation, so a workflow that inserts thousands of measurements consumes its budget as it runs. n8n can be self-hosted with Docker or npm, which keeps the database traffic inside your own network, or used on n8n Cloud when you would rather not run servers. Both give you visual logic on a canvas. Pick on hosting, control over the data, the cost model and which canvas your team reads faster.