Skip to content

LearnDash Automations

Send an Email When a LearnDash Quiz Is Passed (or Failed)

A quiz result is the moment a student most wants feedback — and the moment you most want to know whether they need help. Zapify does this with the A user completes a quiz trigger and the Send an email action, and lets you filter the trigger to only passed attempts, only failed ones, or both. LearnDash is a Zapify PRO integration.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A user completes a quiz (LEARNDASH_QUIZ_COMPLETED, LearnDash)
  • Action: Send an email (WP_SEND_EMAIL, WordPress)

When a student finishes an attempt on the quiz you choose — and it matches the Result you selected — Zapify fills the email with their score and sends it.

No separate pass/fail hook

LearnDash has one event for a finished attempt, not a separate one for passing and failing. The trigger's Result field reads the outcome from the attempt itself, which is why it's a field here rather than two different triggers.

Before you start

  • LearnDash must be installed and active.
  • Zapify PRO must be active, since LearnDash is a PRO integration.
  • The quiz you want to watch must already exist, and must have a passing score configured if you plan to filter on Passed or Failed.

PRO feature

LearnDash (learndash) is a Zapify PRO integration. Every LearnDash trigger and action requires an active PRO licence.

How to build the automation

Step 1: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as Congratulate on passing the final quiz.

Create a new automation

Step 2: Add the "A user completes a quiz" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose LearnDash as the app.

Select LearnDash as the trigger

  1. Select the trigger A user completes a quiz.

Select A user completes a quiz

  1. Configure the trigger's fields:
Field Required What it does
Quiz Yes The specific quiz to watch, or Any quiz.
Result Yes Passed or failed (any outcome, default), Passed, or Failed.
Course No Narrow to attempts within one course, or leave on Any course.

Choose the quiz and result

Step 3: Add the "Send an email" action

  1. Click Add Action.

Add an action

  1. Choose WordPress as the app.

Select WordPress as the action

  1. Select Send an email.

Select Send an email

Step 4: Configure the email

Edit the Send an email action

For example, with Result set to Passed:

  • To: the student
  • Subject: You passed {{trigger:QUIZ_TITLE}}!
  • Body: Score: {{trigger:PERCENTAGE}}% ({{trigger:CORRECT_ANSWERS}} of {{trigger:QUESTION_COUNT}} correct). On to the next lesson.

Complete the Send an Email Action

Step 5: Set the steps Live and save

  1. Set both the trigger and the action to Live.
  2. Click Save.

Set the automation live

Tokens you can use

Token What it holds
Course ID / Course title / Course URL The course the quiz belongs to.
Quiz ID / Quiz title / Quiz URL The quiz that was attempted.
Passed true or false.
Result "Passed" or "Failed", already worded for a message.
Score percentage The percentage score for the attempt.
Points scored / Points available The raw point totals.
Correct answers / Number of questions The raw answer counts.
Attempt reference An internal reference for the attempt.
Completed at The date and time the attempt finished.

How to test it

  1. Take the selected quiz as a test student, aiming for the outcome (Passed or Failed) your automation is filtered to.
  2. Check the recipient inbox for the email.
  3. If nothing arrives, open Zapify → Logs — a mismatched Result filter is the most common reason a run doesn't fire.

Conclusion

With the A user completes a quiz trigger and the Send an email action, Zapify reacts to a quiz result the moment it's in — congratulating a pass or offering help after a fail. Next, follow through on a passed quiz by marking the next step complete with mark a LearnDash step complete, or see the full picture in triggers and actions.

FAQs

Can this fire on a failed attempt to offer help, and on a passed one to congratulate?

Yes, but as two separate automations — create one with Result set to Passed and another set to Failed, each with its own email.

Why did an essay-question quiz fire this twice?

It shouldn't — Zapify de-duplicates a quiz containing an essay question, which LearnDash can otherwise report twice (once on submission, once when the essay is graded), so the automation runs once per attempt.

Is this feature free?

No. LearnDash is a Zapify PRO integration; the trigger and action both require an active PRO licence.

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?