Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

The "Upload Image" operation of the Lectful node allows users to upload image files (JPEG, PNG, JPG, GIF, max 10MB) to the Lectful platform via its API. This is useful for automating the process of adding images to courses, blogs, or other content managed within Lectful. For example, you can use this node to programmatically upload user avatars, course thumbnails, or blog post images as part of an automated workflow.

Properties

Name Meaning
Authentication Mode Choose how to authenticate with the Lectful API: either using stored credentials or manual configuration by providing base URL and API key.
Credentials Note Informational note shown when using Manual Configuration mode explaining credential usage.
Base URL Override Optional base URL to override the credential setting (without /api/v1), used in Manual Configuration mode.
API Key Override Optional API key to override the credential setting, used in Manual Configuration mode.
Image File The image file to upload. Can be a file path string or binary data property name containing the image. Supported formats: JPEG, PNG, JPG, GIF. Max size: 10MB.

Output

The node outputs JSON data representing the response from the Lectful API after uploading the image. This typically includes metadata about the uploaded image such as its ID, URL, filename, size, and other relevant details returned by the API.

If the input image is provided as binary data, the node handles encoding and multipart form-data submission accordingly.

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 node uses HTTP requests with appropriate authentication headers.
  • No additional external dependencies beyond standard HTTP and n8n helper methods.

Troubleshooting

  • Missing or invalid credentials: If using stored credentials, ensure they are properly configured with a valid base URL and API key. If using manual mode, both Base URL Override and API Key Override must be provided.
  • File size limits: Uploaded images must not exceed 10MB. Larger files will likely cause API errors.
  • Unsupported file format: Only JPEG, PNG, JPG, and GIF formats are supported. Uploading other formats may result in failure.
  • Binary data issues: When specifying a binary property for the image, ensure the binary data exists on the input item and is correctly formatted.
  • API errors: Any error messages returned by the Lectful API will be included in the node output if "Continue On Fail" is enabled; otherwise, the node execution will stop with an error.

Links and References

Discussion