Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

This node integrates with the Lectful API to manage AI resources among many other resource types. Specifically, for the Delete AI Resource operation, it allows users to delete an existing AI resource and its associated file from the Lectful platform by specifying the resource's ID.

Common scenarios where this node is beneficial include:

  • Automating cleanup of obsolete or unused AI resources in a course.
  • Managing AI resource lifecycle programmatically within workflows.
  • Integrating AI resource management into larger automation pipelines involving courses and content.

Practical example:

  • A workflow that deletes an AI resource after a course is archived or updated, ensuring no orphaned files remain on the Lectful system.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful API:
- Use Stored Credentials
- Manual Configuration (provide base URL and API key manually)
Credentials Note Notice shown when using Manual Configuration mode explaining credential usage.
Base URL Override Optional base URL to override the stored credential setting (without /api/v1).
API Key Override Optional API key to override the stored credential setting.
AI Resource ID The numeric ID of the AI resource to delete. This is required to identify which resource to remove.

Output

The node outputs the JSON response returned by the Lectful API after attempting to delete the specified AI resource. Typically, this will be a confirmation of deletion or an error message if the deletion failed.

  • The output is structured as an array of objects, each containing a json property with the API response.
  • No binary data is output for this operation.

Example output JSON structure (conceptual):

{
  "json": {
    "message": "AI resource deleted successfully",
    "id": 12345
  }
}

Or in case of failure:

{
  "json": {
    "error": "Resource not found"
  }
}

Dependencies

  • Requires access to the Lectful API.
  • Requires either stored credentials configured in n8n or manual entry of the Lectful API base URL and API key.
  • The API key must have sufficient permissions to delete AI resources.
  • No additional external dependencies beyond HTTP request capability.

Troubleshooting

  • Missing or invalid credentials:
    Error: "Valid credentials are required..."
    Solution: Ensure you have configured valid Lectful API credentials in n8n or provide correct manual configuration parameters.

  • Base URL or API key missing in manual mode:
    Error: "Base URL Override is required..." or "API Key Override is required..."
    Solution: Provide both base URL and API key when using manual authentication mode.

  • Invalid AI Resource ID:
    Error from API indicating resource not found or invalid ID.
    Solution: Verify the AI Resource ID exists and is correct.

  • Permission errors:
    If the API key lacks permission to delete resources, the API will return an authorization error.
    Solution: Check API key permissions and roles.

  • Network or connectivity issues:
    Errors related to network failures or timeouts.
    Solution: Verify network connectivity and Lectful API availability.

Links and References


This summary focuses on the Delete AI Resource operation within the Lectful node, describing its purpose, inputs, outputs, and common troubleshooting tips based on static code analysis.

Discussion