Knack icon

Knack

Knack Api

Overview

The Knack node for n8n allows you to interact with the Knack API, specifically to update records in a selected Knack object. Using the "Update" operation, you can modify existing records by specifying their ID and providing new values for one or more fields. This is useful for automating updates to your Knack database from workflows, such as syncing data from other sources, correcting information, or batch updating records.

Practical examples:

  • Automatically update customer addresses when receiving new information from another system.
  • Change the status of an order after payment confirmation.
  • Update user profile details based on input from a web form.

Properties

Name Meaning
Object Name or ID The Knack object (table) to update a record in. You can select from a list or specify an object key/ID using an expression.
Record ID The unique identifier of the record you want to update. Required for the update operation.
Fields The fields and their new values to set on the record. This is a collection where you can add multiple field types:
- Text / Other: Specify a field and its new value.
- Address: Specify a field and provide subfields like Country, Street, City, State, Zip, etc.
- Name: Specify a field and provide subfields like Title, First, Middle, Last.

Output

  • The output will be a JSON object representing the updated record as returned by the Knack API.
  • The structure of the output JSON will match the fields of the updated record, with field names mapped to their human-readable names.
  • Example output:
    {
      "Field Name 1": "Updated Value",
      "Field Name 2": {
        "Country": "USA",
        "City": "New York"
      },
      "Field Name 3": {
        "First": "John",
        "Last": "Doe"
      }
    }
    
  • If an error occurs and "Continue On Fail" is enabled, the output will include an error property with the error message.

Dependencies

  • External Service: Requires access to the Knack API.
  • Credentials: You must configure Knack API credentials in n8n (knackApi).
  • No additional environment variables are required beyond standard n8n credential setup.

Troubleshooting

Common issues:

  • Invalid Object or Field IDs: Ensure that the object and field IDs/names are correct and exist in your Knack app.
  • Missing Record ID: The "Record ID" property is required for updates; omitting it will cause errors.
  • Insufficient Permissions: The API credentials used must have permission to update records in the specified object.
  • Field Type Mismatch: Providing incorrect data types for fields (e.g., text in a number field) may result in API errors.

Error messages:

  • "Record not found": The provided Record ID does not exist in the selected object.
  • "Invalid field": One or more fields specified do not exist or are not valid for the selected object.
  • "Authentication failed": Check your Knack API credentials configuration in n8n.

Links and References

Discussion