LIVEAI Bootcamps · May 2026 · 🇫🇷 CET
Resources · Integrations · n8n FREE · 2026TimescaleDB logo featuring a circular icon with a clock hand-like design and the brand name

TIMESCALEDB n8n INTEGRATION: AUTOMATE TIMESCALEDB WITH N8N

TIMESCALEDB N8N INTEGRATION: AUTOMATE TIMESCALEDB WITH N8N

Need help

Need help automating Timescaledb with n8n?

Our team will get back to you in minutes.

Reply within 1 business hour
Why automate

Why automate Timescaledb with n8n?

The TimescaleDB n8n integration gives you access to 3 powerful actions: Insert, Update, and Execute Query. These operations cover the essential database interactions you need to build robust data pipelines. Instead of manually inserting records or writing custom scripts for every database operation, n8n handles it all visually—connecting your time-series data to over 400 other applications.

Significant time savings become immediately apparent. No more SSH sessions to run SQL commands or building custom API endpoints just to insert a row. Set up an n8n workflow once, and every incoming webhook, form submission, or scheduled event automatically writes to your TimescaleDB instance. For teams managing IoT data, this means thousands of sensor readings can flow into your database without human intervention.

Zero oversight, 24/7 operation. Your workflows run continuously, inserting metrics as they arrive, updating records when conditions change, and executing maintenance queries on schedule. A temperature sensor triggers an insert; an anomaly detection service updates a status column; a nightly workflow runs cleanup queries. All automated.

Concrete use cases include: syncing CRM data into TimescaleDB for analytics using HubSpot n8n integration, inserting webhook payloads from payment processors, updating inventory levels from e-commerce platforms, and running scheduled reports that query aggregate time-series data. Whatever your data pipeline needs, the TimescaleDB n8n integration handles the database layer seamlessly.

Credentials

How to connect Timescaledb to n8n?

  1. !
    1 step

    How to connect Timescaledb to n8n?

    1. 01

      Add the node

      Connecting TimescaleDB to n8n uses PostgreSQL-compatible credentials, since TimescaleDB is built on top of PostgreSQL. You'll need your database connection details ready before starting.Open your n8n workflow and add a TimescaleDB node to the canvas. Click on the node to open its configuration panel.Create new credentials by clicking on the "Credential to connect with" dropdown and selecting "Create New." This opens the credential configuration window.Enter your connection details: provide your TimescaleDB host (e.g., your-instance.tsdb.cloud.timescale.com), port (typically 5432), database name, username, and password. If you're using TimescaleDB Cloud, you'll find these details in your service dashboard.Enable SSL if required. Most cloud TimescaleDB instances require SSL connections. Toggle the SSL option and configure the appropriate SSL mode (usually "require" or "verify-full").Test the connection by saving the credentials and running a simple Execute Query action. If the node executes without errors, your connection is properly configured.

    Timescaledb credentials
    TIP
    💡 TIP: Create a dedicated database user for n8n with only the permissions your workflows need. This follows the principle of least privilege—your automation user shouldn't have DROP TABLE access if it only needs to INSERT and SELECT. This protects your production data from accidental workflow misconfigurations. For more automation best practices, check our n8n troubleshooting guide.
Need help

Need help automating Timescaledb with n8n?

Our team will get back to you in minutes.

Reply within 1 business hour
Actions

Timescaledb actions available in n8n

  1. 01
    Action 01

    Update

    The Update action modifies existing records in your TimescaleDB tables based on a unique key. Use this when you need to change values in already-stored data—updating statuses, correcting entries, or syncing changes from external systems back into your database.

    Key parameters:

    • Credential to connect with: A required dropdown for selecting your TimescaleDB account credentials.
    • Schema: A required text field for the database schema (typically "public").
    • Table: A required text field specifying which table contains the records to update.
    • Update Key: A required text field defining the column used to identify which records to modify (e.g., "id"). This acts as your WHERE clause reference.
    • Columns: A required text field with comma-separated column names that will be updated (e.g., "name,description,status").
    • Return Fields: An optional field to specify which columns should be returned after the update completes.
    • Additional Fields: Optional advanced properties for complex update scenarios.

    Practical use cases:

    • Update order statuses when shipping providers send webhook notifications
    • Sync customer profile changes from your CRM back into TimescaleDB
    • Mark sensor alerts as "resolved" when acknowledgment events arrive
    • Update inventory quantities when stock movements are recorded in external systems

    Pro tip: Combine the Update action with a preceding database query or API call to dynamically fetch the update key values. This lets you build workflows that first identify which records need updating, then apply the changes in sequence.

    Update
  2. 02
    Action 02

    Insert

    The Insert action allows you to add new records directly into any TimescaleDB table from your n8n workflow. This is your go-to operation for feeding data into your time-series database—whether it's sensor readings, user events, transaction logs, or any other data that needs to be stored.

    Key parameters:

    • Credential to connect with: A required dropdown to select your configured TimescaleDB account credentials for authentication.
    • Schema: A required text field specifying which database schema contains your target table. Defaults to "public" for most standard setups.
    • Table: A required text field where you enter the exact name of the destination table.
    • Columns: A required text field accepting a comma-separated list of column names (e.g., "id,name,description,timestamp") indicating which columns will receive data.
    • Return Fields: An optional field specifying which columns to return after insertion. Use "*" for all fields or list specific columns.
    • Additional Fields: An optional section for advanced configurations like conflict handling or SQL-specific clauses.

    Practical use cases:

    • Insert IoT sensor data from MQTT webhooks into a hypertable for time-series analysis
    • Log user activity events from your application into TimescaleDB for behavioral analytics
    • Store payment transaction records from PayPal n8n integration for financial reporting
    • Archive form submissions from Typeform or Google Forms into structured database tables

    This action pairs perfectly with n8n's scheduling capabilities—set up a workflow that pulls data from an API every 5 minutes and inserts it into TimescaleDB for continuous data collection.

    Insert
  3. 03
    Action 03

    Execute Query

    The Execute Query action gives you full SQL flexibility within your n8n workflows. When Insert and Update aren't enough, this action lets you run any valid SQL statement against your TimescaleDB instance—complex SELECTs, JOINs, aggregations, or even DDL commands if your credentials permit.

    Key parameters:

    • Credential to connect with: A required dropdown to select your TimescaleDB account credentials.
    • Query: A required text area where you write the SQL query to execute. This accepts any valid PostgreSQL/TimescaleDB SQL syntax.
    • Additional Fields: Optional section for advanced configurations or query parameters.

    Practical use cases:

    • Run aggregation queries to calculate daily averages from time-series data and send reports via email
    • Execute TimescaleDB-specific functions like time_bucket() for downsampling data within workflows
    • Perform complex JOINs across multiple tables to enrich data before sending it to external services
    • Run scheduled maintenance queries like continuous aggregate refreshes or data retention policies
    • Query recent data to check thresholds and trigger alerts when values exceed limits

    This action is particularly powerful for analytics workflows. For example, you could schedule a daily workflow that runs SELECT time_bucket('1 hour', time) AS bucket, AVG(temperature) FROM sensors WHERE time > NOW() - INTERVAL '24 hours' GROUP BY bucket and sends the results to Discord or stores them in a Google Sheet for stakeholder review.

    When to use it: Choose Execute Query when you need read operations (SELECT), complex multi-table operations, TimescaleDB-specific functions, or any SQL that goes beyond simple INSERT/UPDATE. It's your escape hatch to the full power of SQL within visual automation workflows.

    Execute Query
You've seen the integration

Build your first workflow with our team

Drop your email and we'll send you the catalog of automations you can ship today.

  • Free n8n & Make scenarios to import
  • Step-by-step setup docs
  • Live cohort + community support

Frequently asked questions

  • Is the TimescaleDB n8n integration free?
    Yes, the TimescaleDB integration is included in all versions of n8n, including the free self-hosted edition. You don't need any paid add-ons or premium plans to use the TimescaleDB node. However, you will need a TimescaleDB instance to connect to—this could be a free-tier TimescaleDB Cloud account, a self-hosted installation, or any TimescaleDB-compatible database. The integration itself has no additional licensing costs, making it accessible for hobbyists, startups, and enterprises alike. Just install n8n, configure your database credentials, and start building workflows. For a complete overview of n8n capabilities, see our n8n review.
  • Can I use TimescaleDB-specific features like hypertables and continuous aggregates with n8n?
    Absolutely. Since the Execute Query action accepts any valid SQL, you have full access to TimescaleDB's unique features. You can run queries using time_bucket() for time-based aggregations, query hypertables just like regular tables, and even execute REFRESH MATERIALIZED VIEW commands for continuous aggregates. The Insert and Update actions work seamlessly with hypertables—data is automatically partitioned by TimescaleDB based on your table configuration. For advanced time-series operations, use Execute Query to leverage compression policies, data retention rules, or any other TimescaleDB-specific functionality. Learn more in the official TimescaleDB documentation.
  • How do I handle errors when inserting data into TimescaleDB from n8n?
    n8n provides several error handling mechanisms for database operations. First, you can enable "Continue On Fail" in the node settings to prevent workflow crashes when an insert fails—useful for batch operations where some records might have issues. Second, use n8n's built-in error workflow feature to catch failures and log them or send notifications via email and Slack alerts. For duplicate key errors specifically, you can use the Execute Query action with ON CONFLICT clauses (e.g., INSERT ... ON CONFLICT DO UPDATE) to handle upsert scenarios gracefully. Always test your workflows with sample data before running them on production tables.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.