npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-moodle

v0.1.1

Published

n8n node for Moodle integration

Readme

n8n-nodes-moodle

This is an n8n community node that provides comprehensive integration with Moodle LMS through its Web Services API.

n8n is a fair-code licensed workflow automation platform.

Installation

Follow the installation guide in the n8n community nodes documentation.

Quick Installation

  1. In n8n, go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-moodle
  4. Click Install

Manual Installation (CLI)

npm install n8n-nodes-moodle

Credentials

To use this node, you need to configure your Moodle instance to allow Web Service access:

Setting up Moodle Web Services

  1. Enable Web Services

    • Go to Site administrationAdvanced features
    • Enable "Enable web services"
    • Save changes
  2. Enable REST Protocol

    • Go to Site administrationServerWeb servicesManage protocols
    • Enable "REST protocol"
  3. Create a Web Service

    • Go to Site administrationServerWeb servicesExternal services
    • Click "Add"
    • Give it a name (e.g., "n8n Integration")
    • Enable "Enabled"
    • Enable "Authorised users only"
  4. Add Functions

    • Click "Functions" for your service
    • Add the required functions (see list below)
  5. Create a Token

    • Go to Site administrationServerWeb servicesManage tokens
    • Click "Create token"
    • Select your user and the service you created
    • Save the generated token

Required Moodle Functions

Add these functions to your web service:

User Operations:

  • core_user_create_users
  • core_user_get_users
  • core_user_get_users_by_field
  • core_user_update_users
  • core_user_delete_users

Course Operations:

  • core_course_create_courses
  • core_course_get_courses
  • core_course_get_courses_by_field
  • core_course_update_courses
  • core_course_delete_courses
  • core_course_get_categories

Enrollment Operations:

  • core_enrol_get_enrolled_users
  • core_enrol_get_users_courses
  • enrol_manual_enrol_users
  • enrol_manual_unenrol_users

Grade Operations:

  • gradereport_overview_get_course_grades
  • gradereport_overview_view_grade_report

Message Operations:

  • core_message_send_instant_messages
  • core_message_get_messages
  • core_message_get_conversations
  • core_message_get_conversation_messages

System Operations:

  • core_webservice_get_site_info

Configuring Credentials in n8n

  1. In n8n, create new Moodle API credentials
  2. Enter your Moodle URL (e.g., https://your-moodle-site.com)
  3. Enter the Web Service token you created

Operations

This node supports the following operations:

Users

  • Create - Create a new user
  • Get - Get a user by ID
  • Get All - Get multiple users with search options
  • Update - Update user information
  • Delete - Delete a user

Courses

  • Create - Create a new course
  • Get - Get a course by ID
  • Get All - Get all courses
  • Update - Update course information
  • Delete - Delete a course
  • Get Enrolled Users - Get users enrolled in a course
  • Get Categories - Get course categories

Enrollments

  • Enroll User - Enroll a user in a course
  • Unenroll User - Remove a user from a course
  • Get User Courses - Get courses a user is enrolled in
  • Get Course Users - Get users enrolled in a course

Grades

  • Get User Course Grades - Get all course grades for a user
  • View Grade Report - Mark that a user viewed their grade report

Messages

  • Send Message - Send a message to a user
  • Get Messages - Get user messages (legacy)
  • Get Conversations - Get user conversations (recommended)
  • Get Conversation Messages - Get messages from a conversation

System

  • Get Site Info - Get Moodle site information

Example Workflows

1. Bulk User Creation

Create multiple users from a spreadsheet:

{
  "nodes": [
    {
      "name": "Spreadsheet File",
      "type": "n8n-nodes-base.spreadsheetFile",
      "position": [250, 300]
    },
    {
      "name": "Moodle",
      "type": "n8n-nodes-moodle.moodle",
      "position": [450, 300],
      "parameters": {
        "resource": "user",
        "operation": "create"
      }
    }
  ]
}

2. Course Enrollment Automation

Automatically enroll users in courses based on criteria:

{
  "nodes": [
    {
      "name": "Get Users",
      "type": "n8n-nodes-moodle.moodle",
      "parameters": {
        "resource": "user",
        "operation": "getAll"
      }
    },
    {
      "name": "Filter Users",
      "type": "n8n-nodes-base.filter"
    },
    {
      "name": "Enroll in Course",
      "type": "n8n-nodes-moodle.moodle",
      "parameters": {
        "resource": "enrollment",
        "operation": "enroll"
      }
    }
  ]
}

Version History

0.1.0

  • Initial release
  • Complete Moodle LMS integration
  • Support for Users, Courses, Enrollments, Grades, Messages, and System operations

Resources

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Author

Murat Cakir

Acknowledgments

This project was developed collaboratively with assistance from Claude (Anthropic's AI assistant) for:

  • API integration architecture and HTTP request formatting
  • Comprehensive workflow design and use case implementation
  • Docker networking solutions and debugging approaches
  • Moodle API parameter formatting and error handling