In our previous article, "What is a Webhook?" we discussed what Webhooks are and how they can be used within LogonBox to automate certain tasks and actions. In this article, we will now provide an example of creating and using a Webhook that will create new user accounts.
To begin creating the Webhook, select the Create button.
In the Create Webhook window, we need to set a name and some basic details. The URL ID entry is used to identify which Webhook is being called, the URL Method determines which method is used to gather the information used, in this case we will select URL with Parameters.
Next, in the Parameters tab, we can define the required parameters to make the user account. In this case, we will request the account's full name, username, and email address. Select the Create option to complete the Webhook.
The Webhook has now been created and added to the list.
Select the + icon to the left of the entry to expand the Webhook.
Now select the + in the Create User box.
Now, create the next webhook trigger. In this case, we want this webhook to trigger on a success, select the Credentials tab and set the Principal Name field, use the variable button to the right of the field and locate the variable for the Username that is provided in the account details.
Go to the Details tab and enter the variables for Fullname and Email into the appropriate fields and then select the Create button.
Now this process will take the information from the the request and make the user, we can add additinal step that will notify user that their account has been created. Select the + icon in the createuser webhook.
Again we want this to trigger on a success and we want the task to be Send Email
Select the Plain Message tab and you can enter the message for the email that is sent to the user.
Go to the Delivery tab and in the To field we can add the variable for the Email address that is provided during the account creation.
With this the Webhook is complete we can now test the creation process is working, with the settings we've configuredwe need to construct a URL with the details for the user, this will look something like this: