This workflow automates CrateDB operations via a webhook, performing CRUD actions (insert, update, delete). Key nodes include Webhook (receives POST requests), Input Validation (sanitizes inputs), Check Input Valid (verifies operation), Prepare Insert/Update Data (formats records), CrateDB Insert/Update/Delete (executes queries), Check Insert Success (confirms insertion), Process Operations Result (summarizes output), Success Response (returns JSON), and error responses (Invalid Input, Insert Error, CrateDB Operations). It uses the CrateDB service. Setup Requirements Install n8n from n8n.io or sign up at cloud.n8n.io. Import the JSON into n8n’s workflow editor. Install CrateDB locally or use a cloud provider (e.g., Crate.io Cloud). Obtain CrateDB credentials (host, port, username, password) from your CrateDB instance or provider’s dashboard. In n8n, configure crateDb credentials under cratedb-credentials with the host, port, username, and password. Configure the Webhook node by copying its URL (/cratedb-operations). Set allowedOrigins (e.g., 'https://your-domain.com') for security. The workflow expects a JSON payload with 'operation' (e.g., test_crud), 'tableName', 'name', and 'id'. Handle errors like invalid operation (400: Invalid operation) or connection failure (502: Failed to insert). Secure credentials and webhook URL. Testing and Deployment Import the JSON into n8n and activate the workflow. Ensure CrateDB is running and credentials are configured. Test the Webhook with a POST request (e.g., curl -X POST [webhook-url] -d '{"operation": "test_crud", "tableName": "testtable", "name": "TestRecord"}' -H 'Content-Type: application/json'). Verify CrateDB Insert/Update adds and modifies records, CrateDB Delete removes them, and Success Response returns JSON with operation summaries. Test error cases: invalid operation (400: Invalid operation), wrong credentials (502: Failed to insert), or non-existent table (502: CrateDB operations failed). Check n8n and CrateDB logs for errors. Integrate the webhook URL into your application, ensure CrateDB accessibility, activate the workflow, and deploy for automated database operations. Monitor CrateDB connection stability and query performance.
$6.99
Workflow steps: 14
Integrated apps: webhook, set, if