Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

This node integrates with the Lectful API, enabling users to interact programmatically with various resources such as lectures, courses, users, enrollments, and more. Specifically, for the Lecture - Get operation, it retrieves detailed information about a specific lecture by its ID.

Typical use cases include:

  • Fetching lecture details to display or process within an automation workflow.
  • Integrating lecture data into other systems or dashboards.
  • Automating content management tasks related to lectures.

For example, you might use this node to get the metadata of a lecture before sending notifications to students or updating a learning management 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 Informational note shown when using Manual Configuration mode.
Base URL Override Optional base URL to override the credential setting (without /api/v1). Used only in Manual Configuration mode.
API Key Override Optional API key to override the credential setting. Used only in Manual Configuration mode.
Lecture ID The unique identifier of the lecture to retrieve. This is a required field for the Get operation on the Lecture resource.

Output

The node outputs an array of JSON objects, each containing the response from the Lectful API for the requested lecture. The JSON structure corresponds directly to the lecture details returned by the API endpoint /lectures/{lectureId}.

The output JSON typically includes fields such as:

  • Lecture title
  • Description
  • Type (e.g., video, article, quiz)
  • Position/order in the section
  • Duration
  • Access flags (e.g., free, locked)
  • Availability times (opens_at, closes_at)
  • Associated section and course IDs

No binary data is output for this operation.

Example output snippet (simplified):

{
  "id": "123",
  "title": "Introduction to Node.js",
  "type": "video",
  "position": 1,
  "duration": 3600,
  "is_free": false,
  "is_locked": false,
  "section_id": "456",
  "course_id": "789",
  "opens_at": "2024-01-01T00:00:00Z",
  "closes_at": null
}

Dependencies

  • Requires access to the Lectful API.
  • Requires either stored credentials configured in n8n or manual entry of the Base URL and API key.
  • The API key must have sufficient permissions to read lecture details.
  • No additional external dependencies beyond standard HTTP request capabilities provided by n8n.

Troubleshooting

  • Missing or invalid credentials: If neither stored credentials nor manual overrides are properly set, the node will throw an error indicating missing authentication details.
  • Lecture ID not provided: The lectureId property is required; omitting it will cause the node to fail.
  • API errors: Errors returned by the Lectful API (e.g., 404 if the lecture does not exist) will be surfaced in the node's output or error messages.
  • Manual configuration errors: When using manual mode, ensure the Base URL does not include /api/v1 suffix, as the node appends it automatically.
  • Network issues: Connectivity problems to the Lectful API endpoint will result in request failures.

To resolve common errors:

  • Verify credentials and API key validity.
  • Confirm the lecture ID exists and is correct.
  • Check network connectivity and API endpoint accessibility.
  • Use the node’s debug logs to trace request URLs and payloads.

Links and References

  • Lectful API Documentation (Assumed URL, replace with actual if available)
  • n8n documentation on HTTP Request Node for understanding underlying request mechanics.
  • General API authentication best practices for managing API keys securely.

Discussion