Moodle

Interact with Moodle LMS - Complete Integration (v0.1.0)

Overview

This node integrates with Moodle LMS to perform various operations on Moodle resources such as users, courses, enrollments, grades, messages, and system information. Specifically, for the User - Get operation, it retrieves detailed information about a single user by their user ID.

Typical use cases include:

  • Fetching user details for reporting or synchronization with other systems.
  • Automating user management workflows by retrieving user data before updates or deletions.
  • Integrating Moodle user data into external dashboards or CRMs.

Example: Given a user ID, this node fetches the corresponding user's profile information from Moodle, which can then be used downstream in an automation workflow.

Properties

Name Meaning
User ID The unique numeric identifier of the user to retrieve from Moodle. This is a required field.

Output

The output JSON contains the user object retrieved from Moodle. It includes all standard Moodle user fields returned by the core_user_get_users_by_field API call filtered by user ID. The structure typically includes properties like:

  • id: User ID
  • username
  • firstname
  • lastname
  • email
  • Other profile fields depending on Moodle configuration

If the user is found, the output is a single JSON object representing that user.

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Moodle API credential configured in n8n to authenticate requests.
  • Depends on Moodle's web service API being enabled and accessible.
  • The node uses the Moodle core web service function core_user_get_users_by_field with the field set to "id".

Troubleshooting

  • No user found / empty result:
    This may occur if the provided User ID does not exist, or the API user lacks permission to view the user. Verify the User ID and ensure the API credentials have sufficient permissions.

  • API errors related to authentication:
    Check that the Moodle API key/token is valid and has access to the required web services.

  • Unexpected response format:
    If Moodle returns unexpected data, verify the Moodle version and web service configuration.

  • Network or connectivity issues:
    Ensure the Moodle server URL is correct and reachable from the n8n instance.

Links and References

Discussion