Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

This node integrates with the Lectful API to manage quiz questions within a quiz system. Specifically, the Quiz Question - Create operation allows users to add new questions to a specified quiz. This is useful in educational platforms or learning management systems where quizzes are dynamically created or updated via automation workflows.

Typical use cases include:

  • Automatically generating quiz questions from external content.
  • Adding questions programmatically during course creation or updates.
  • Integrating quiz question creation into broader automated educational workflows.

For example, an educator could automate adding multiple choice or fill-in-the-blank questions to a quiz after uploading course materials.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful API: "Use Stored Credentials" or "Manual Configuration".
Credentials Note Notice shown when using Manual Configuration mode explaining credential overrides.
Base URL Override Optional base URL to override stored credentials (without /api/v1), used only in Manual mode.
API Key Override Optional API key to override stored credentials, used only in Manual mode.
Quiz ID The unique identifier of the quiz to which the question will be added. (Required)
Content (Quill Delta JSON) The question content formatted as Quill Delta JSON, representing rich text and formatting. (Required)
Type The type of question. Options: Multiple Choice, Fill Blank, Matching. (Default: Multiple Choice)
Settings (JSON) Additional settings for fill_blank and matching question types, provided as JSON string.
Feedback (Quill Delta JSON) Optional feedback content for the question, also in Quill Delta JSON format.

Output

The node outputs the response from the Lectful API as JSON in the json field of the output data. This typically includes details of the newly created quiz question such as its ID, content, type, settings, feedback, and metadata returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires access to the Lectful API endpoint.
  • Requires authentication either via stored credentials configured in n8n or manual entry of Base URL and API key.
  • The API key must have permissions to create quiz questions.
  • No additional external dependencies beyond HTTP access to the Lectful API.

Troubleshooting

  • Missing or invalid credentials: If neither stored credentials nor manual configuration parameters are properly set, the node will throw an error indicating missing or invalid credentials.
  • Invalid JSON in Settings: The Settings (JSON) property is parsed before sending; malformed JSON will cause a failure. Ensure valid JSON syntax.
  • API errors: Errors returned by the Lectful API (e.g., invalid quiz ID, permission denied) will be surfaced in the node's error output.
  • Empty required fields: Omitting required fields like Quiz ID or Content will cause validation errors.
  • Manual mode without overrides: When using Manual Configuration mode, both Base URL Override and API Key Override must be provided; otherwise, an error is thrown.

To resolve issues:

  • Verify credentials and API key validity.
  • Validate JSON strings before input.
  • Confirm that the quiz ID exists and is accessible.
  • Use the node's error messages and logs for debugging.

Links and References


This summary covers the logic and usage of the Lectful node's "Quiz Question - Create" operation based on static analysis of the source code and provided properties.

Discussion