- Home
- Resources
- Integrations
- TimescaleDB
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
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.
How do you connect TimescaleDB to n8n?
- 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.
- 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.
- 03
Decide how SSL behaves
The SSL selector controls the
ssl-modeof 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.
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.
Operations index
Execute a SQL query
executeQueryWhat 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$1and$2used 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,independentlyexecutes each on its own,transactionruns them in a single transaction.
Insert rows in database
insertWhat 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, soid:int,name:textsetsintfor id andtextfor name. - Return Fields: a comma-separated list of the fields the operation returns.
917 records the position of the ISS.Update rows in database
updateWhat 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.
Need help automating TimescaleDB with n8n?
A person reads every message.

