Librus icon

Librus

Read data from Librus Synergia (unofficial)

Overview

This node integrates with the Librus API, a platform commonly used in educational environments for managing school-related information. The node allows users to perform various operations related to messages, homework, absences, calendar events, and general info retrieval from the Librus system.

The Send Message operation under the Info resource enables sending messages through the Librus messaging system. This is useful for teachers, students, or parents who want to programmatically send notifications or communications within the Librus environment.

Practical examples include:

  • Sending announcements or reminders to specific users or groups.
  • Automating communication workflows based on external triggers.
  • Integrating Librus messaging with other systems like email or chat platforms.

Properties

Name Meaning
Custom method name Advanced: override the underlying Librus API method to call (e.g., getMarks). If empty, defaults to the standard method for the selected operation.

Note: Although only one property was provided explicitly, the code internally uses many parameters such as resource, operation, from, to, folderId, page, messageId, deleteMessageId, userId, title, content, group, attachmentPath, subjectId, homeworkId, absenceId, ttFrom, ttTo, month, year, eventId, eventIsAbsence, and others depending on the operation. These are used to tailor the API calls but were not detailed in the user-provided properties.

Output

The output of the node depends on the operation performed:

  • For most operations, the node returns JSON objects representing the data retrieved or affected by the API call. For example, message details, lists of homework, absence records, calendar events, grades, notifications, or account info.
  • When sending a message (messages.sendMessage), it returns the response from the API indicating success or failure.
  • For the messages.getFile operation, the node outputs binary data representing the file content. This binary data is base64 encoded and includes metadata such as MIME type (application/octet-stream) and filename extracted from the attachment path.
  • The output is always an array of items, each containing a json field with the relevant data. If binary data is present, it is included under a binary field with the specified property name (default "data").

Dependencies

  • Requires valid credentials for the Librus API, specifically a login and password.
  • Uses an internal client wrapper (LibrusClientWrapper) to interact with the Librus API.
  • Relies on helper functions for filtering results by date range and converting streams to buffers.
  • No additional external services beyond the Librus API are required.
  • The node expects proper configuration of credentials within n8n to authenticate API requests.

Troubleshooting

  • No supported method found error: If the node throws an error stating no supported method was found for the resource and operation, verify that the resource and operation names are correct and supported by the current version of the Librus API client.
  • Authentication failures: Ensure that the provided login and password credentials are correct and have sufficient permissions.
  • Empty or unexpected responses: Check if the date filters (from, to) or pagination parameters are set correctly; incorrect values may result in empty datasets.
  • Binary data issues: When retrieving files, ensure the attachmentPath is valid and accessible; otherwise, the node may fail to fetch or convert the file properly.
  • Custom method usage: Using the customMethodName property incorrectly can cause the node to attempt calling non-existent methods, leading to errors. Use this feature only if you know the exact method name available in the API client.

Links and References

Discussion