A webhook is a way for an app to provide other applications with real-time information. It delivers data to other applications when triggered, meaning you get data immediately, unlike typical API calls where you would need to poll for data very frequently to get it in real-time.
In this article, we will go through the LearnWorlds available webhooks and demonstrate their usage through various use cases.
If you want more information on how to use Webhooks with Zapier, check this article.
Trigger webhooks via User automations
You can streamline your workflows by triggering webhooks directly through user automations. By combining the flexibility of user automations with the functionality of webhooks, you can seamlessly send real-time data to external systems whenever specific events take place—based on the conditions you set.
To set this up, navigate to User → Automations and create a new automation. Here, you can define any trigger and select Send a Webhook as the action.
For example, you can set up a webhook to be sent when a specific certificate is awarded. While general webhooks include an option for When a Certificate is Awarded, using automations allows you to target a specific activity or certificate. In contrast, the general webhook is triggered for all certificates without applying additional criteria.
- The When a user is registered/updated applies to manual updates/registrations and to SSO registrations too (When manually enrolled by the admin & when the learner is registered from the sign-up form, When the user profile is updated by the learner & updated by the admin).
- The When a free section is previewed webhook, refers to the free sections within Paid courses, not Free courses.
- The When a free section is previewed webhook, is not triggered for the enrolled users. It's clear that a user who is already enrolled in a course would not require access to a free section preview, as they already have full access to the course. Therefore, the concept of previewing does not apply in this scenario.
- If a webhook does not receive a successful response, we retry 20 times, each time double the time between retries, i.e., 1 minute, 2 minutes, 4 minutes, etc.