In a study commissioned by Middlesex University for Work-Based Learning, 74% of respondents felt that they weren’t achieving their full potential at work due to a lack of personal and professional development opportunities. Staff want a path to furthering their personal and professional skillsets, and when organizations fail to do so, they risk losing their best employees.
Those leading the charge to better training have created learning opportunities to enable employee growth and achievement. For our clients, those vehicles to development come in the form of automated bots on Workplace from Facebook.
In this tutorial, we’re going to show you how to create a training bot that allows your staff to learn about a topic and then take a test to ensure the training has been absorbed. The bot then records the user’s progress, their final score and then stores this data into a Google sheet. If you are not a TBP user and are interested in learning more, fill out the form at the bottom of this page and a member of our team will get in touch!
Intermediate. You need a basic knowledge of The Bot Platform, Integromat and Google Sheets.
- – An account on The Bot Platform
- – A Workplace instance and page with admin access
- – An Integromat account
- – A Google account
Step one: Creating your training bot
First, you will need to create the bot that delivers training materials and content to your staff. Each section of training should include a button that the user clicks to confirm they’ve read/watched/listened to the training and are ready to move on to the next section.
When a user clicks that button, you will want to choose the option ‘increment a variable and send a message’. Create a variable to increment called ‘Training progress’. Within the button settings, select save user attribute and send a message. This function will trigger the bot to send the users the next message within the sequence.
On the very last message in your training, you want to include a button that gives them the option to take the quiz. Within this buttons settings, select set variable and send a message. Set the variable ‘Training progress’ to be completed. You then want to send them to the first quiz question.
Next, let’s set up a spreadsheet in Google Sheets to record the results of our training and quiz. You will need three columns; name, training progress and quiz score
Step two: Creating your quiz
Again you will want to create a series of questions and quick replies to test their learning. When they select the wrong answer, you want to go to the next question. When they select the right answer, you want to increment a new variable called score.
Step three: Creating the Integromat scenario to record the results
First we need to set up a new scenario in Integromat. The first module should be a webhook. You want to set up a new webhook and copy the URL created. Now we need to make use of the API within The Bot Platform. You will need to get API access activated before you can use it. Contact us through Intercom to request this.
Once activated, you will have the API settings option down the left hand side. Paste the URL into the endpoint field and save. It should now look like this:
The main difference between using the API and the webhook message, is that the API will send data through every time the user interacts with the bot, instead of waiting until it hits the webhook message.
Run through your bot and do the training and complete the quiz. On the very last question of your quiz, run the integromat scenario. This will pull through your data and variables into Integromat. Now we need to build the integromat scenario out so it looks as follows:
The first step after our webhook is to search google sheets to see if the user has already done some of the training or the quiz. So we need a search rows module. You want to search the name column for the firstname and lastname fields pulled through via your webhook, as follows:
Now we need to filter the actions based on how far through the training they are and if they have done the quiz. Add in a Router step in Integromat.
On the top branch, we want to add in a route for if they have started the training, but haven’t completed it or done the quiz.
Add in an ‘add a row in Google Sheets’ module. You want to create a row in your spreadsheet that updates the name field with the firstname and lastname fields pulled through from the webhook. You also want to pull through the ‘Training progress’ variable and use this to populate the training progress column in your spreadsheet.
You will need to add in a filter on this branch that checks to see that ‘Training progress’ exists, that ‘Training progress’ does not contain completed and ‘quiz score’ does not exist.
We now need to add in an action for when they have completed the training but not yet done the quiz. Add in an ‘update row in google sheets’ module. You want to use the row number found when the search row module is called after the webhook module. You then want to update the training progress field with the ‘Training progress’ variable. It should look as shown below:
Now we need to add a filter on this step. You want to check that ‘Training progress’ contains ‘Complete’ and ‘quiz score’ does not exist.
Finally, we can add in the top step which is for recording the score when the quiz is done. Again, you want to use an ‘update a row in Google Sheets’ module. Use the row number from the search rows module and update the quiz score column in your spreadsheet with the ‘quiz score’ variable pulled through from the webhook.
Now we need to set up a filter on this branch to ensure that ‘quiz score’ exists.
This now means that you have three flows that can tell you how far a user has got through the training, when they have completed it and what score they got on a test. You can extend this further to provide a webhook response asking them to retake the test if they got a low score or to finish the training if they have “passed”.