Skip to content

LifterLMS Automations

Add a User Role When Someone Enrols on a LifterLMS Course

Want enrolled students to get a role that unlocks a private forum, a members-only area, or different capabilities elsewhere on your site — without assigning it by hand? Zapify does this with the A user is enrolled on a course trigger and the free Add a role to a user action. LifterLMS is a Zapify PRO integration; the role action itself is free.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A user is enrolled on a course (LIFTERLMS_COURSE_ENROLLED)
  • Action: Add a role to a user (WP_ADD_USER_ROLE, WordPress)

When a student is enrolled on the course you choose, Zapify adds the role you selected to their account.

Zapify listens on LifterLMS' llms_user_enrolled_in_course signal. LifterLMS fires the same event whichever way the enrolment happened — self-checkout, an admin adding the student manually, or access granted through a membership — so this one trigger covers all of them.

Before you start

  • LifterLMS must be installed and active.
  • Zapify PRO must be active, since LifterLMS is a PRO integration.
  • The course you want to watch, and the role you want to grant, must already exist.

PRO feature

LifterLMS (lifterlms) is a Zapify PRO integration. The trigger requires an active PRO licence. The Add a role to a user action itself is free.

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 Grant student role on enrolment.

Create a new automation

Step 2: Add the "A user is enrolled on a course" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose LifterLMS as the app.

Select Lifter-LMS Trigger

  1. Select the trigger A user is enrolled on a course.

Select A user is Enrolled on a Course

  1. In the trigger's Course field, pick the specific course, or leave it on Any course to grant the role for enrolment on any of them.

Step 3: Add the "Add a role to a user" action

  1. Click Add Action.

Add an action

  1. Choose WordPress as the app.

Select Wordpress as Action

  1. Select Add a role to a user.

Select "Add a Role to User" Action

Step 4: Leave the User field empty to target the student

The action's User field decides who gets the role. Its description reads "Leave empty to use the user this automation is running for." Because the A user is enrolled on a course trigger starts this run, leaving User empty applies the role to the student who was just enrolled.

Select User

Step 5: Choose the role

Select the role from the Role field — it lists the roles that exist on your site, so pick a custom role such as Student or Community Member.

Select Role

Step 6: Decide whether to replace existing roles

Setting Result
Off (default) The selected role is added; the student keeps any roles they already have.
On The selected role replaces every role the student currently has.

Leave it Off unless you specifically want enrolment to strip a student's existing roles — most sites want the new role added alongside Subscriber or Customer, not instead of it.

Select "Replace Exesting Role"

Step 7: Set the steps Live and save

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

Set the automation live

Step 8: Test it

Enrol a test student on the selected course, either directly or through checkout. Open their profile in Users → All Users and check the Role column, or open Zapify → Logs to confirm the run.

Tokens used in this automation

This automation needs no tokens in the core setup — leaving User empty targets the enrolled student automatically. The A user is enrolled on a course trigger still exposes these tokens if you add further actions, such as a welcome email:

Token What it holds
Course ID The numeric ID of the course.
Course title The course's name.
Course URL The permalink to the course.

Conclusion

With the A user is enrolled on a course trigger and the Add a role to a user action, Zapify unlocks the rest of your site for a student the instant they gain course access — no matter how they enrolled. Combine it with an email when a user is enrolled on a LifterLMS course in the same automation, or grant access from a WooCommerce sale with enrol a user on a course when a WooCommerce product is purchased.

FAQs

Does this fire regardless of how the student enrolled?

Yes. LifterLMS fires llms_user_enrolled_in_course whether the student purchased access, was enrolled manually, or gained access through a membership, so the trigger covers all of them.

Is this feature free?

The trigger is part of the LifterLMS PRO integration and needs an active PRO licence. The Add a role to a user action itself is free.

Will this remove the student's existing roles?

No, not unless you turn on Replace existing roles. Left off, the new role is added alongside any the student already has.

Can different courses grant different roles?

Yes. Create a separate automation for each course, each with its own Course field and Role field.

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?