Actions20
- User Actions
- Course Actions
- Enrollment Actions
- Grade Actions
- Message Actions
Overview
This node integrates with the Moodle Learning Management System (LMS) to perform various operations on Moodle resources such as users, courses, enrollments, grades, messages, and system information. Specifically for the Course - Get operation, it retrieves detailed information about a specific course by its ID.
Typical use cases include:
- Fetching course details to display or process in workflows.
- Automating reporting or synchronization tasks involving course data.
- Integrating Moodle course information into other systems or dashboards.
Example: You want to retrieve the full details of a course with ID 42 to update an external database or trigger notifications based on course metadata.
Properties
Name | Meaning |
---|---|
Course ID | The unique numeric identifier of the course to retrieve. This is required for the "Get" operation on the Course resource. |
Output
The output JSON contains the detailed information of the requested course. The structure corresponds to Moodle's course object returned by the core_course_get_courses_by_field
API call filtered by course ID. Typical fields include:
id
: Numeric course ID.fullname
: Full name of the course.shortname
: Short name (unique identifier).categoryid
: Category ID the course belongs to.- Other optional fields like description, format, number of sections, start/end dates, visibility, etc., depending on the Moodle setup and API response.
If the course is found, the output JSON will be a single object representing that course. If not found, the output may be empty or undefined.
No binary data output is produced by this operation.
Dependencies
- Requires a valid connection to a Moodle instance via an API key credential configured in n8n.
- The Moodle web service must have enabled the function
core_course_get_courses_by_field
. - The user associated with the API key must have permission to access course information.
- No additional external dependencies beyond the Moodle API.
Troubleshooting
Common issues:
- Invalid or missing Course ID parameter.
- Insufficient permissions for the API user to read course data.
- Moodle web services not properly configured or the required function disabled.
- Network connectivity issues between n8n and the Moodle server.
Error messages:
- Errors from the Moodle API will typically indicate permission problems or invalid parameters.
- If the course is not found, the output may be empty without explicit error; verify the Course ID is correct.
- If the web service function is unavailable, check Moodle's external services configuration.
Resolutions:
- Ensure the Course ID is correct and exists in Moodle.
- Verify the API credentials have sufficient rights.
- Confirm the Moodle web service function
core_course_get_courses_by_field
is enabled. - Test connectivity and API access outside n8n if needed.
Links and References
- Moodle Web Services API documentation:
https://docs.moodle.org/dev/Web_services_API_functions#core_course_get_courses_by_field - Moodle External Services setup guide:
https://docs.moodle.org/311/en/External_services - n8n documentation on credentials and HTTP Request nodes for custom API calls:
https://docs.n8n.io/credentials/
https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/