Ksaar icon

Ksaar

Consume Ksaar API

Overview

This node interacts with the Ksaar API to update a file associated with a specific record in a workflow. It allows users to upload or replace a file stored in a particular field of a record within a given application and workflow context.

Common scenarios where this node is beneficial include:

  • Automating updates of document attachments or images linked to records in a database.
  • Replacing outdated files in records as part of a data processing pipeline.
  • Integrating external file sources by uploading files into Ksaar-managed records.

For example, you might use this node to update a user's profile picture stored as a file in a record or to replace a contract PDF attached to a customer record after revisions.

Properties

Name Meaning
Send Headers Boolean flag to indicate whether custom HTTP headers should be sent with the request.
Headers Collection of custom HTTP headers (name-value pairs) to include if "Send Headers" is enabled.
Application The target application where the record exists. Can be selected from a list or specified by ID.
Workflow The workflow within the application that contains the record. Selectable from a list or by ID.
Field The specific file field in the record to update. Selectable from a list or specified by ID.
Record ID The unique identifier of the record whose file is being updated.

Output

The node outputs a JSON array containing the response from the Ksaar API after updating the file. This typically includes metadata about the updated file or confirmation of the successful update.

If the operation involves binary data (the file content), the node uploads it using multipart/form-data but does not output binary data itself; instead, it returns the API's JSON response related to the file update.

Dependencies

  • Requires an active connection to the Ksaar API via an API key credential configured in n8n.
  • The node depends on the Ksaar API endpoints for records, workflows, applications, and file fields.
  • Binary data input must be provided in the incoming item under the property named "data" for the file upload.

Troubleshooting

  • Invalid IDs: The Application, Workflow, Field, and Record IDs must match UUID format. Errors will occur if invalid IDs are provided.
  • Missing Binary Data: If no binary data named "data" is found in the input item, the node will fail when attempting to upload the file.
  • API Authentication Errors: Ensure the API key credential is correctly set up and has permissions to modify records and files.
  • Field Type Mismatch: The specified field must be a file-type field; otherwise, the API may reject the update.
  • Network Issues: Connectivity problems with the Ksaar API endpoint can cause timeouts or failures.

To resolve errors, verify all IDs, ensure binary data is present and correctly named, check API credentials, and confirm network connectivity.

Links and References

Discussion