ClickHouse icon

ClickHouse

Query and ingest data into ClickHouse

Actions2

Overview

This n8n node allows you to insert data into a ClickHouse database table. It is designed for scenarios where you need to automate the ingestion of structured data (such as product information, logs, or analytics events) from your workflows directly into ClickHouse. For example, you might use this node to store processed results from other systems, aggregate data from APIs, or log workflow events for later analysis.

Properties

Name Type Meaning
Table name String The name of the ClickHouse table where data will be inserted. You can use n8n expressions.

Output

  • The node does not return any output data when performing an Insert operation.
  • If used in a workflow, the output will be an empty array, meaning no new items are passed to subsequent nodes.

Dependencies

  • External Service: Requires access to a ClickHouse database.
  • Credentials: Needs a configured ClickHouse credential in n8n with the following fields:
    • URL (host)
    • Database
    • Username
    • Password
  • npm Dependency: Uses the @clickhouse/client package.

Troubleshooting

  • Common Issues:

    • Invalid Credentials: If the ClickHouse credentials are incorrect, the node will fail to connect and throw an authentication error.
    • Table Not Found: If the specified table does not exist in the database, the insert operation will fail.
    • Data Format Errors: If the input data structure does not match the schema of the target table, the insert may fail.
  • Error Messages:

    • "Connection successful!" – Indicates a successful connection test.
    • "Error: <message>" – Any connection or query error will return the error message from ClickHouse. Check credentials, table name, and data format.

Links and References

Discussion