Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

The node interacts with the Lectful API to manage AI resources among many other resource types. Specifically, for the Update AI Resource operation, it allows updating an existing AI resource's metadata and optionally replacing its associated file. This is useful when you want to rename an AI resource, update its description, or upload a new file to replace the current one.

Practical examples:

  • Renaming an AI resource to better reflect its content.
  • Adding or modifying the description of an AI resource for clarity.
  • Replacing the file of an AI resource with a newer version or corrected document.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful API: "Use Stored Credentials" or "Manual Configuration".
Base URL Override (Manual mode) Optional base URL to override the credential setting (without /api/v1).
API Key Override (Manual mode) Optional API key to override the credential setting.
AI Resource ID The unique identifier of the AI resource to update (required).
New Name New name for the AI resource; leave empty to keep the current name.
Description Description text for the AI resource; optional.
New File Binary property name (e.g., data) or a file URL/path to upload as replacement (max 10MB).

Output

The output is a JSON object representing the updated AI resource returned by the Lectful API. It typically includes fields such as the resource's ID, name, description, file metadata (like file path, size, type), status, timestamps, and other relevant details.

If a new file is uploaded, the response will reflect the updated file information.

No binary data is output directly by this node; file uploads are handled via multipart form-data in the request.

Dependencies

  • Requires access to the Lectful API.
  • Requires either stored credentials configured in n8n or manual input of the base URL and API key.
  • The API key must have permissions to update AI resources.
  • If uploading a new file from binary data, the binary property must be present in the input item.

Troubleshooting

  • Missing Base URL or API Key in Manual Mode: The node throws an error if either the base URL override or API key override is missing when using manual authentication.
  • Invalid or Missing Credentials: When using stored credentials, the node requires valid credentials with both base URL and API key set.
  • Binary Property Not Found: If specifying a binary property name for the new file but the property does not exist in the input data, the file upload will fail.
  • File Size Limit: Uploaded files must not exceed 10MB; larger files may cause errors.
  • Malformed JSON: If any JSON parameters (not applicable here specifically) are malformed, the API might reject the request.
  • API Errors: The node logs detailed debug information about the request and response, which can help diagnose issues like permission errors or invalid resource IDs.

Links and References


This summary focuses exclusively on the Update AI Resource operation within the Lectful node as requested.

Discussion