Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

This node integrates with the Lectful API to manage AI resources and their association with courses. Specifically, the "Attach AI Resource to Course" operation allows users to link an existing AI resource (such as a PDF, Word document, image, etc.) to a specific course within the Lectful platform. This is useful for enriching course content by associating relevant AI-generated or AI-related materials directly with courses.

Common scenarios include:

  • Automatically attaching AI-generated study materials or references to courses.
  • Managing course content dynamically by linking or unlinking AI resources.
  • Enhancing course offerings with supplementary AI resources without manual intervention.

Example: A course on machine learning could have AI-generated PDFs or datasets attached automatically via this node, making them accessible to enrolled students.

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's base URL (without /api/v1)
API Key Override Optional API key to override the stored credential's API key
AI Resource ID The numeric ID of the AI resource to attach
Course ID The numeric ID of the course to which the AI resource will be attached

Output

The node outputs the JSON response from the Lectful API after attempting to attach the AI resource to the specified course. The output JSON typically contains details about the attachment status or the updated course resource list.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "status": "success",
  "message": "AI resource attached to course successfully",
  "data": {
    "courseId": 123,
    "aiResourceId": 456,
    "attachedAt": "2024-01-01T12:00:00Z"
  }
}

Dependencies

  • Requires access to the Lectful API.
  • Requires either stored credentials configured in n8n or manual input of the Lectful API base URL and API key.
  • The API key must have permissions to modify course resources and AI resource attachments.

Troubleshooting

  • Missing or invalid credentials: If neither stored credentials nor manual overrides are provided correctly, the node will throw an error indicating missing authentication information.
  • Invalid AI Resource ID or Course ID: Providing non-existent IDs will result in API errors; verify IDs before running the node.
  • API permission errors: Ensure the API key used has sufficient rights to attach AI resources to courses.
  • Network or connectivity issues: Standard HTTP request failures may occur if the Lectful API is unreachable.
  • Malformed input: Ensure that numeric IDs are provided as numbers, not strings, to avoid type errors.

Links and References

Discussion