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 fieldDescription
user_idWordPress user ID
user_emailUser email address
user_display_nameUser display name
user_first_nameUser first name
user_last_nameUser last name
course_idLearnDash course ID
course_titleCourse title
course_urlCourse URL
enrollment_dateDate 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 fieldDescription
user_idWordPress user ID
user_emailUser email address
user_display_nameUser display name
user_first_nameUser first name
user_last_nameUser last name
course_idCourse ID
course_titleCourse title
course_urlCourse URL
steps_completedNumber of steps the student completed
steps_totalTotal number of steps in the course
completion_dateCompletion date
certificate_urlURL 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 fieldDescription
user_idWordPress user ID
user_emailUser email address
course_idCourse ID
course_titleCourse title
lesson_idLesson ID
lesson_titleLesson title
completion_dateDate 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 fieldDescription
user_idWordPress user ID
user_emailUser email address
course_idCourse ID
course_titleCourse title
lesson_idParent lesson ID
topic_idTopic ID
topic_titleTopic title
completion_dateDate 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 fieldDescription
user_idWordPress user ID
user_emailUser email address
course_idCourse ID
course_titleCourse title
quiz_idQuiz ID
quiz_titleQuiz title
passBoolean — true if the student passed, false if they failed
scoreScore as a percentage
percentageScore percentage
pointsPoints scored
total_pointsTotal possible points
correct_countNumber of correct answers
total_questionsTotal number of questions
time_spentTime the student spent on the quiz
completion_dateQuiz submission date
certificate_urlCertificate 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 pass equals true to the Yes branch and pass equals false to 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 fieldDescription
user_idWordPress user ID
user_emailUser email address
group_idLearnDash group ID
group_titleGroup title
enrollment_dateDate 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.

FieldRequiredDescription
user_id or user_emailYesIdentify the user by their WordPress user ID or email address. Use merge tags from the trigger.
course_idYesThe 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.

FieldRequiredDescription
user_id or user_emailYesThe user to unenroll.
course_idYesThe 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.

FieldRequiredDescription
user_id or user_emailYesThe user to mark progress for.
lesson_idYesThe LearnDash lesson or topic ID to mark as complete.
course_idYesThe 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.

FieldRequiredDescription
user_id or user_emailYesThe user to add.
group_idYesThe 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.

FieldRequiredDescription
user_id or user_emailYesThe user to remove.
group_idYesThe LearnDash group ID.

Common use: Removing a student from a group when their WooCommerce Subscription is cancelled or expires.

Setting up a LearnDash workflow #

  1. Go to Krom Automation > Workflows and click Add New Workflow.
  2. Click Add Trigger and select the LearnDash trigger that matches the event you want to respond to.
  3. If using Quiz Completed, add a Condition node on pass to branch the workflow into pass and fail paths.
  4. Add your actions. Use {{user_id}}, {{user_email}}, {{course_title}}, and {{certificate_url}} as merge tags.
  5. 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:

TemplateWhat it does
ld-enrollment-welcomeWelcome email with course resources on enrollment
ld-course-completionCompletion confirmation and next-step instructions
ld-certificate-shareEmails a certificate when a course is completed
ld-group-onboardingOnboarding flow when a student is added to a group
ld-quiz-failedSupportive follow-up email when a student fails a quiz
ld-upsell-on-completionUpsell 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.

What are your feelings

Updated on August 12, 2026