TimescaleDB Timeseries Automation

This n8n workflow automates TimescaleDB operations, managing timeseries data like sensor readings. Key nodes include Webhook (receives POST requests), Input Validation (sets parameters), Insert Timeseries Data, Query Recent Data, Update Timeseries Data, Query Updated Data, Cleanup Test Data (database interactions), Prepare Timeseries Data, and Success/Error Response nodes (handle outputs). Set up Requirements and Configuration: Install n8n by downloading from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud setup. Follow installation prompts or create a cloud account. Set up a TimescaleDB instance via timescaledb.com or a cloud provider like AWS. Obtain database credentials: host, port, database name, username, and password from your TimescaleDB setup. In n8n, import the provided JSON to create the workflow. Configure the 'Insert Timeseries Data,' 'Query Recent Data,' 'Update Timeseries Data,' 'Query Updated Data,' and 'Cleanup Test Data' nodes with your TimescaleDB credentials under 'Credentials,' selecting 'TimescaleDB.' Set the Webhook node’s path to 'timescaledb-operations' and ensure it accepts POST requests. The Input Validation node checks for valid table names and operations ('timeseries_data_cycle', 'insert_data', 'query_data', 'update_data'). Testing and Deployment Steps: Test by sending a POST request to the Webhook URL (from the Webhook node) using Postman. Example JSON body: {'operation': 'timeseries_data_cycle', 'table': 'conditions', 'location': 'test', 'temperature': 25.5, 'humidity': 60, 'pressure': 1010}. The 'Success Response' node returns a 200 status with operation details, or 'Invalid Input Response' (400 status) for invalid table names. If credentials are invalid, the 'Data Insertion Error' or 'TimescaleDB Operations Error' nodes return a 502 status. Activate the workflow in n8n’s interface for deployment. Check logs for errors like connection failures or invalid SQL, and verify credentials or table existence if issues arise.

$6.99

Workflow steps: 16

Integrated apps: webhook, set, if

TimescaleDB Timeseries Automation  preview