
Connectors / Human resources · HTTP Connector
Automate Moodle with Tray.ai
Create courses and create grade categories in Moodle. Connect Moodle to the rest of your human resources stack with Tray.ai.
What can you do with Moodle on Tray.ai?
Moodle is an open-source learning management system that schools and companies use to run online courses, enrol learners, and track grades. Tray.ai connects to Moodle through the HTTP Connector, so your workflows can call the Moodle API alongside the rest of your stack.
- Create users in Moodle when new hires are added to your HR system.
- Enrol users in compliance training when their role changes in your HR system.
- Get grades for completed courses and record them in your training records.
- Unenrol users when an employee leaves, based on your HR system's offboarding list.
- Connects through
- HTTP Connector
- Authentication
- An API key in the query string
- Base URL
- https://{your-moodle-site}/webservice/rest/server.php
Set it up
Connect Moodle to Tray.ai
Each step uses Moodle's own API details, from its documentation.
Step 1
Save Moodle's API key
Save the key as a Tray.ai authentication and add it to the query string from $.auth, so it never sits in the workflow itself.
Step 2
Point the HTTP Client at the API
Add an HTTP Client step and use https://{your-moodle-site}/webservice/rest/server.php as the base URL. Or paste a cURL example from Moodle's API docs, and Tray.ai fills in the method, URL, and headers.
Step 3
Start with “List courses”
It's one of 15 documented actions, under Courses. The response comes back as data the next step can map into your other apps.
Step 4
Hand it to an AI agent
Wrap “Create courses” and “Update courses” in workflows, and Tray.ai's Agent Gateway for MCP publishes them as governed tools Claude and other AI agents can call.
Workflows to build with Moodle
Each one uses actions and events from Moodle's own API documentation.
Enroll new Workday hires in Moodle onboarding
When
A worker is hired in Workday REST
Then
- Create users in Moodle for the new hire
- Enrol users in the onboarding course
With Workday REST
Remove departed BambooHR employees from Moodle courses
When
An employee is terminated in BambooHR
Then
- Get users by ID in Moodle
- Unenrol users from their active courses
With BambooHR
Sync Moodle training grades to Google Sheets
When
On a schedule
Then
- List courses in Moodle
- Get grades in Moodle for each course
- Update the compliance training sheet in Google Sheets
With Google Sheets
Apps you can build on Moodle data
Internal tools your team can build with an AI assistant, each one using Moodle calls from its API documentation.
Course enrollment desk
Lists Moodle courses and enrolled users and lets an admin enroll or unenroll learners.
Learner grade report
Shows enrolled users for a course with their grades and lets an instructor correct a grade.
Give your AI agents Moodle tools
Build an MCP server on Moodle in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works
- List courses
- Get users by ID
- Enrol users
- Get grades
- Create courses
- Update courses
- Delete courses
- Create users
What the Moodle API covers
4 resources and 15 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.
Courses
- List courses
- Create courses
- Update courses
- Delete courses
Users
- Get users by ID
- Create users
- Update users
- Delete users
Enrolments
- Enrol users
- List enrolled users
- Edit a user enrolment
- Unenrol users
Grades
- Get grades
- Update grades
- Create grade categories
Checked against Moodle's own documentation on 2026-10-22
How Tray.ai makes this work
Moodle plugs into the whole Tray.ai platform
Intelligent Integration
Integrate and automate across 12,000+ apps, databases, APIs, and services with visual workflows, error handling, and observability.
Learn more →Agent Builder
Build AI agents that read, write, and take action in Moodle — with guardrails, audit, and human-in-the-loop.
Learn more →Agent Gateway for MCP
Expose Moodle actions as governed MCP tools — observable, rate-limited, authenticated.
Learn more →Tray Helix
Build apps on Moodle data with your AI assistant, then deploy, run, and govern them on Tray.ai.
Learn more →More human resources apps on Tray.ai
Dedicated connectors and other apps Tray.ai reaches in the same category. See every human resources connector →
Frequently asked questions
What can a Tray.ai workflow do in Moodle?
+
The Moodle API documents 15 actions across 4 resources (Courses, Users, Enrolments, Grades). For example: List courses; Get users by ID; Enrol users. A workflow can make any documented call through the HTTP Connector.
How does Tray.ai authenticate with Moodle?
+
The Moodle API uses an API key in the query string. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.
See Moodle working against your stack.
We'll walk through a tailored demo with your systems plugged in.
Thanks — someone from our team will be in touch soon.