Lectful icon

Lectful

Interact with the VIPay Lectful API

Overview

The node integrates with the Lectful API, enabling automation of various operations related to educational content management. Specifically for the Image - Update operation, it allows updating metadata or details of an existing image resource in the Lectful system.

This node is beneficial when you want to programmatically manage images used within courses, blogs, or other resources on the Lectful platform. For example, you might update image descriptions or tags after uploading them, or correct metadata without manual intervention.

Practical example:

  • Automatically update image metadata after processing or tagging images externally.
  • Synchronize image information from another system into Lectful via workflow automation.

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 overrides
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
Image ID The unique identifier of the image to update (required)

Output

The node outputs a JSON object representing the updated image resource as returned by the Lectful API. This typically includes fields such as image ID, URLs, metadata, timestamps, and any other properties managed by Lectful for images.

If the update operation is successful, the output JSON reflects the current state of the image resource after modification.

The node does not output binary data for this operation; it only handles metadata updates.


Dependencies

  • Requires access to the Lectful API.
  • Requires either:
    • Stored credentials configured in n8n containing the Lectful API base URL and API key, or
    • Manual configuration providing the base URL and API key directly in the node parameters.
  • The node uses HTTP requests with Bearer token authentication to communicate with the Lectful API.

Troubleshooting

  • Missing or invalid credentials:
    Error if neither valid stored credentials nor manual configuration with base URL and API key are provided.
    Resolution: Configure credentials properly or switch to manual mode and provide required values.

  • Missing Image ID:
    The Image ID parameter is required for update operations. Omitting it will cause errors.
    Resolution: Ensure the Image ID is set correctly.

  • API request failures:
    Could be due to network issues, incorrect base URL, invalid API key, or insufficient permissions.
    Resolution: Verify API endpoint accessibility, credentials validity, and user permissions.

  • Empty update body:
    The current implementation sends an empty body {} for the update operation, which may result in no changes or API errors depending on Lectful API behavior.
    Resolution: Confirm if additional metadata fields should be added to the update body to effect changes.


Links and References


Summary of execute() logic for Resource "Image" and Operation "Update"

  • Authenticates using either stored credentials or manual config.
  • Sends a PUT request to /admin/images/{imageId} endpoint.
  • Request body is currently an empty object {}, implying no metadata fields are updated.
  • Returns the API response JSON as output.

This node action is primarily designed to update image metadata but requires extension or customization to specify which metadata fields to update.

Discussion