LearnDash Integration: Enrollment, Completion, Quiz, and Group Triggers
Krom Automation Pro connects to LearnDash, giving you six triggers and five actions covering the full student lifecycle — from enrollment through lesson and topic completion, quiz results, group membership, and course completion. Combined with Krom Automation’s email, CRM, and messaging integrations, you can build complete student automation systems without writing any code.
No API key or configuration is required. Krom Automation detects LearnDash automatically when it is active.
Requirements #
- Krom Automation Pro installed and activated
- LearnDash installed and active
Available triggers #
User Enrolled
Fires when a user gains access to a LearnDash course. This fires regardless of how enrollment happened — a direct WooCommerce purchase, a manual admin enrollment, a group-based enrollment, or a programmatic enrollment from another plugin.
| Data field | Description |
|---|---|
user_id | WordPress user ID |
user_email | User email address |
user_display_name | User display name |
user_first_name | User first name |
user_last_name | User last name |
course_id | LearnDash course ID |
course_title | Course title |
course_url | Course URL |
enrollment_date | Date of enrollment |
Common use: Sending a welcome email with course resources, adding the student to a CRM list, notifying the instructor in Slack, or enrolling the student in a ConvertKit welcome sequence.
Course Completed
Fires when a student completes all required steps in a LearnDash course and the course is marked complete.
| Data field | Description |
|---|---|
user_id | WordPress user ID |
user_email | User email address |
user_display_name | User display name |
user_first_name | User first name |
user_last_name | User last name |
course_id | Course ID |
course_title | Course title |
course_url | Course URL |
steps_completed | Number of steps the student completed |
steps_total | Total number of steps in the course |
completion_date | Completion date |
certificate_url | URL of the generated certificate (if certificates are enabled) |
Common use: Emailing a certificate to the student, alerting your team in Slack, enrolling the student in the next course, tagging them in Mailchimp or ConvertKit, or offering an upsell to a more advanced course.
Lesson Completed
Fires when a student marks a LearnDash lesson as complete.
| Data field | Description |
|---|---|
user_id | WordPress user ID |
user_email | User email address |
course_id | Course ID |
course_title | Course title |
lesson_id | Lesson ID |
lesson_title | Lesson title |
completion_date | Date the lesson was completed |
Common use: Sending encouragement or resource emails after specific lessons, tracking lesson completion in Google Sheets, or notifying the instructor of student progress.
Topic Completed
Fires when a student completes a LearnDash topic, which is a sub-step within a lesson.
| Data field | Description |
|---|---|
user_id | WordPress user ID |
user_email | User email address |
course_id | Course ID |
course_title | Course title |
lesson_id | Parent lesson ID |
topic_id | Topic ID |
topic_title | Topic title |
completion_date | Date the topic was completed |
Common use: Granular progress tracking, sending topic-specific resources, or triggering an action at a very specific point in the course structure.
Quiz Completed
Fires when a student submits a LearnDash quiz, regardless of whether they passed or failed. Use a condition on {{pass}} to branch the workflow based on the result.
| Data field | Description |
|---|---|
user_id | WordPress user ID |
user_email | User email address |
course_id | Course ID |
course_title | Course title |
quiz_id | Quiz ID |
quiz_title | Quiz title |
pass | Boolean — true if the student passed, false if they failed |
score | Score as a percentage |
percentage | Score percentage |
points | Points scored |
total_points | Total possible points |
correct_count | Number of correct answers |
total_questions | Total number of questions |
time_spent | Time the student spent on the quiz |
completion_date | Quiz submission date |
certificate_url | Certificate URL (if awarded on quiz pass) |
Common use: Sending a congratulations email on pass, a supportive retry email on fail, tagging the student in FluentCRM or Mailchimp based on their result, or unlocking the next course only if they passed.
Tip: Add a condition on
passequalstrueto the Yes branch andpassequalsfalseto the No branch. This lets a single workflow handle both pass and fail outcomes with different actions on each path.
Group Enrolled
Fires when a user is added to a LearnDash group. LearnDash groups bundle multiple courses and can be used to represent cohorts, teams, or organisations.
| Data field | Description |
|---|---|
user_id | WordPress user ID |
user_email | User email address |
group_id | LearnDash group ID |
group_title | Group title |
enrollment_date | Date the user was added to the group |
Common use: Sending a group welcome email, notifying the group leader, or granting additional WordPress access when a student joins a group.
Available actions #
Enroll in Course
Grants a user access to a LearnDash course programmatically. If the user is already enrolled, this action completes silently without error.
| Field | Required | Description |
|---|---|---|
user_id or user_email | Yes | Identify the user by their WordPress user ID or email address. Use merge tags from the trigger. |
course_id | Yes | The LearnDash course ID to enroll the user in. |
Common use: Auto-enrolling a student in a follow-on course when they complete a prerequisite, or granting course access when a WooCommerce Subscription is created.
Unenroll from Course
Removes a user’s access to a LearnDash course. This does not delete the student’s progress data — it only removes access.
| Field | Required | Description |
|---|---|---|
user_id or user_email | Yes | The user to unenroll. |
course_id | Yes | The LearnDash course ID. |
Common use: Revoking course access when a WooCommerce Subscription expires or a MemberPress membership is cancelled.
Mark Lesson Complete
Programmatically marks a LearnDash lesson or topic as complete for a user, without the user needing to visit and complete it manually.
| Field | Required | Description |
|---|---|---|
user_id or user_email | Yes | The user to mark progress for. |
lesson_id | Yes | The LearnDash lesson or topic ID to mark as complete. |
course_id | Yes | The course the lesson belongs to. |
Common use: Marking an introductory lesson as complete automatically when a user enrolls, or updating progress during a course migration.
Add to Group
Adds a user to a LearnDash group, granting them access to all courses bundled in that group.
| Field | Required | Description |
|---|---|---|
user_id or user_email | Yes | The user to add. |
group_id | Yes | The LearnDash group ID. |
Common use: Adding a student to a cohort group when a WooCommerce Subscription is created, or grouping students who share the same membership level.
Remove from Group
Removes a user from a LearnDash group, revoking access to courses bundled in that group.
| Field | Required | Description |
|---|---|---|
user_id or user_email | Yes | The user to remove. |
group_id | Yes | The LearnDash group ID. |
Common use: Removing a student from a group when their WooCommerce Subscription is cancelled or expires.
Setting up a LearnDash workflow #
- Go to Krom Automation > Workflows and click Add New Workflow.
- Click Add Trigger and select the LearnDash trigger that matches the event you want to respond to.
- If using Quiz Completed, add a Condition node on
passto branch the workflow into pass and fail paths. - Add your actions. Use
{{user_id}},{{user_email}},{{course_title}}, and{{certificate_url}}as merge tags. - Simulate and activate.
Screenshot: LearnDash Quiz Completed trigger with a condition node splitting into a Yes branch (passed) and a No branch (failed), each with different Send Email actions.
Screenshot: WooCommerce Subscription Created trigger connected to a LearnDash Add to Group action — showing the subscription-to-course-access pattern.
Real-world automation examples #
Enrollment welcome email with course link Trigger: User Enrolled Action: Send Email to {{user_email}} with a welcome message, {{course_title}}, and a button linking to {{course_url}}.
Certificate email on completion Trigger: Course Completed Action: Send Email to {{user_email}} congratulating them and including {{certificate_url}} as a download link.
Quiz pass/fail branching Trigger: Quiz Completed Condition: pass equals true Yes branch: Send Email (congratulations + next steps), ConvertKit Add Tag passed-quiz-name No branch: Send Email (encouragement + retry guidance), ConvertKit Add Tag failed-quiz-name
Auto-enroll in next course on completion Trigger: Course Completed (condition: course_id equals your prerequisite course ID) Action: LearnDash Enroll in Course with your next course ID using {{user_id}}
Revoke access on subscription cancellation Trigger: WooCommerce Subscriptions Subscription Cancelled Action: LearnDash Remove from Group using {{customer.email}} and your subscription group ID
Team alert in Slack on course completion Trigger: Course Completed Action: Slack Send Message to #courses with {{user_display_name}} completed {{course_title}} on {{completion_date}}
Pre-built templates #
Install these from Krom Automation > Templates:
| Template | What it does |
|---|---|
ld-enrollment-welcome | Welcome email with course resources on enrollment |
ld-course-completion | Completion confirmation and next-step instructions |
ld-certificate-share | Emails a certificate when a course is completed |
ld-group-onboarding | Onboarding flow when a student is added to a group |
ld-quiz-failed | Supportive follow-up email when a student fails a quiz |
ld-upsell-on-completion | Upsell to next course when a student completes a course |
Troubleshooting on LearnDash Integration #
The User Enrolled trigger is firing multiple times for the same student and course
This can happen if the enrollment hook fires multiple times due to another plugin or if the user is enrolled, unenrolled, and re-enrolled. Use Run once per entity in Run Control to restrict the workflow to a single execution per user-course combination.
The Enroll in Course action isn’t giving the student access
Confirm the course ID is correct. Also check whether LearnDash requires payment for that course — programmatic enrollment bypasses payment, but some LearnDash configurations restrict access methods.
The {{certificate_url}} merge tag is empty
Certificates are only generated when LearnDash certificates are enabled and configured for that course. Check the course’s LearnDash settings to confirm a certificate is attached to it.