Skip to main content

06 Practice exercise: Unlock content for a limited time, based on user's first login

Written by Marie Xhauflair

In this exercise, you will create an automation that unlocks an activity for a specific group of learners, but only for a limited period of time.

Learning objectives

By the end of this exercise, you will be able to:

  • Create an automation with multiple conditions

  • Unlock content for a user group within a time limit

  • Confirm that the automation works as expected


Why use time-based automations?

Time-based automations are useful when you want content to be visible only for a set period. This helps you:

  • Guide learners through onboarding during their first days

  • Release time-sensitive content that should not stay available forever

Example use case

Imagine you want new employees to see a Welcome learning bite only during their first 7 days after logging in. After this period, the learning bite should disappear from their stream automatically.

🚧 Be careful: An unlock with an end date is withdrawn after the window. The activity leaves the stream and My progress at the learner's next visit after day 7. Progress is kept and comes back if the activity is unlocked again. If learners should keep access to earlier modules, leave the end of the timespan empty and use the end date only on the widget or the notification.


Requirements before you start

Make sure you have:

  • A published activity (for example: Module 1)

  • A widget in the stream that can display this activity

  • A user group (for example: Belgium)

  • At least one test user in that group who has already logged in


Step-by-step: Create the automation

  1. Go to Behaviour > Automations.

  2. Click Create automation.

  3. Enter a name: Unlock Module 1 – Belgium for 7 days.

  4. Set the Event type to Check periodically.

  5. Add the first Condition:

    • Is group → Belgium

  6. Add a second Condition:

    • User time → profile.first_login → from 0h to 7d after

    • This means the condition is only true during the first 7 days after the learner’s first login. A user without a first login date never matches this condition, so the content stays locked for them.

  7. Add the Action:

    • Unlock activity → Module 1

  8. Save and enable the automation.

✏️ Note: When you save an enabled Check periodically automation, its actions run at once for everyone who meets the conditions at that moment. After that the platform checks once an hour, at a minute that differs per platform, so a new match can wait up to an hour. Unlocked content then appears the next time the user's access is calculated, which is when they log in or open the platform, or within a day. Content whose time window has ended disappears the same way, at the user's next visit after the window closes.


Check your practice

What your automation should look like

How to read this automation

  • When the platform checks periodically,

  • and if the user is in the Belgium group and if it is within 0s to 7 days after the user's first login,

  • then unlock the activity Module 1 for that user.


How to confirm it worked

  • Preview the automation

    • Hover over the eye icon next to the automation

    • Check the number of learners who match both conditions. The eye icon shows how many users meet the conditions and, per action, how many have not had that action yet. For an automation that is enabled and has already run, the action count is 0, so use the Activations tab to see who matches now and the user's Audit tab to see what ran

  • Impersonate a test user in Belgium

    • If the user’s first login is within the last 7 days, Module 1 should be visible

    • If the user’s first login was more than 7 days ago, Module 1 should not be visible

  • Test with another group

    • Impersonate a user from a different group (for example, Netherlands)

    • Module 1 should not appear, regardless of login time

🚧 Be careful: Impersonating counts as a real login on the test user's account. It updates their last login and last seen, and for a user who has never logged in it also sets their first login and activates the account. That makes the user count as active in reporting, can trigger automations with a condition on last login, and changes the outcome of a test on first login. Pick a test user who has already logged in, and never use impersonation to test a user who has not logged in yet.


Troubleshooting tips

  • Check that the test user belongs to the correct group

  • Confirm the activity is correctly linked to the widget

  • Verify the time condition: if the login happened more than 7 days ago, the activity will not unlock

  • Remember that Check periodically runs once an hour, so a new match can take up to an hour to be picked up, and the unlock then shows at the user's next visit

  • If you used impersonation to test, remember that it updated the test user's last login


Recap

In this exercise, you practiced:

  • Creating an automation with multiple conditions

  • Unlocking an activity for a specific group within a time frame

  • Testing the automation using preview and impersonation

Did this answer your question?