Actions20
- User Actions
- Course Actions
- Enrollment Actions
- Grade Actions
- Message Actions
Overview
This node integrates with the Moodle Learning Management System (LMS) to manage users and perform various user-related operations. Specifically, the User - Get All operation retrieves multiple user records from a Moodle instance based on optional search criteria.
Common scenarios where this node is beneficial include:
- Retrieving a list of all users or filtered subsets for reporting or synchronization.
- Searching users by email, first name, last name, username, or ID number.
- Limiting the number of returned users to optimize performance or meet API constraints.
Practical example:
- An education platform administrator wants to export all users whose email addresses contain a specific domain.
- A system integration needs to fetch up to 100 users matching a certain last name pattern for batch processing.
Properties
Name | Meaning |
---|---|
Return All | Whether to return all matching users or limit the results. Options: true (all users), false (limit results). |
Limit | Maximum number of users to return if "Return All" is false. Range: 1 to 1000. Default: 50. |
Search By | Field to filter users by. Options: - All Users (no filtering) - First Name - Last Name - Username - ID Number |
Search Value | The value to search for in the selected field. Supports % as a wildcard. Not used if "All Users" is selected. |
Output
The output is an array of user objects in JSON format, each representing a Moodle user record retrieved from the system. Each user object contains standard Moodle user fields such as id, username, firstname, lastname, email, and potentially other user details depending on the Moodle configuration.
If no users are found, the output will be an empty array.
No binary data is produced by this operation.
Dependencies
- Requires a valid connection to a Moodle LMS instance with appropriate API access enabled.
- Needs an API authentication credential configured in n8n to authorize requests to Moodle's web services.
- The Moodle web service function used is
core_user_get_users
. - The node handles fallback logic for wildcard searches on email fields due to Moodle API limitations.
Troubleshooting
- No users found: This may occur if the search criteria do not match any users or if the authenticated user lacks permission to view users. Try broadening the search criteria or verifying permissions.
- Invalid parameter errors: Using wildcards incorrectly or unsupported search values can cause errors. For example, searching all users with a wildcard on email may fail; the node attempts alternative queries internally.
- API connectivity issues: Ensure the Moodle URL and API credentials are correctly configured and that the Moodle web services are enabled.
- Unexpected response format: If Moodle returns unexpected data, it might be due to version differences or customizations. Check Moodle logs and API documentation.
Links and References
- Moodle Web Services API Documentation
- core_user_get_users function details
- n8n Documentation on Creating Custom Nodes
- Moodle User Management
This summary is based solely on static analysis of the provided source code and property definitions.