Knack icon

Knack

Interact with Knack API

Overview

This node integrates with the Knack API to update records within a specified Knack object. It allows users to modify existing records by specifying the record ID and the fields to update. The node supports two modes for inputting field values: a dynamic mode that adapts to the object's schema, and a simple manual mode where fields and values are explicitly selected.

Common scenarios include:

  • Updating customer or client information in a CRM system.
  • Modifying inventory or product details in an e-commerce database.
  • Adjusting status or progress fields in project management applications.

Practical example:

  • A workflow triggers when a form is submitted, updating the corresponding record in Knack with new user inputs such as email, phone number, or address.

Properties

Name Meaning
Object Select the Knack object (database table) where the record exists and will be updated.
Record ID The unique identifier of the record to update within the selected object.
Field Input Mode Choose how to provide field values:
- Dynamic (Schema-based): Fields are generated based on the object's schema.
- Simple (Manual): Manually select fields and enter their values.
Fields (Shown if "Simple" mode is selected) Manually add one or more fields and specify the value to set for each.
Field Values (Shown if "Dynamic" mode is selected) Map fields dynamically using a resource mapper interface that loads editable fields from the selected object.
Additional Options Optional settings:
- Include Field Keys: Whether to duplicate field values with a "_raw" suffix (e.g., "Name": "John", "Name_raw": "John"). Defaults to true.

Output

The node outputs JSON data representing the updated record. The output includes:

  • The record's unique id.
  • Updated field values keyed by their display names.
  • Optionally, duplicated raw field values with a _raw suffix if enabled.
  • The structure reflects the Knack object's schema, with fields mapped to human-readable keys.

No binary data is produced by this operation.

Example output snippet:

{
  "id": "record_id_value",
  "Name": "John Doe",
  "Email": "john.doe@example.com",
  "Status": "Active",
  "Name_raw": "John Doe",
  "Email_raw": "john.doe@example.com",
  "Status_raw": "Active"
}

Dependencies

  • Requires an active connection to the Knack API via an API key credential.
  • Needs proper configuration of the API URL, Application ID, and API Key in the credentials.
  • The node uses HTTP requests to communicate with the Knack REST API endpoints.
  • No additional external libraries beyond those bundled with n8n are required.

Troubleshooting

  • Authentication errors: Ensure the API key and application ID are correctly configured in the credentials.
  • Invalid Record ID: If the record ID does not exist or is malformed, the API will return an error. Verify the record ID before running the node.
  • Field validation errors: When using dynamic or manual field inputs, ensure that field values conform to the expected types and formats defined in the Knack object schema.
  • Network issues: Check connectivity to the Knack API endpoint; timeouts or unreachable errors may occur if the network is down.
  • Permission issues: The API key must have sufficient permissions to update records in the specified object.
  • Empty or missing fields: If no fields are provided for update, the request may fail or have no effect.

If the node encounters an error and "Continue On Fail" is disabled, it will throw an error stopping the workflow. Enabling "Continue On Fail" allows processing subsequent items despite individual failures.

Links and References

Discussion