How to build an Advent Calendar bot
Advent Calendars are a staple holiday tradition and, using bots on Workplace, it’s easy to create fun, interactive experiences that send content and rewards to your staff in the countdown to Christmas.
So, let’s show you how easy it is to build an Advent Calendar bot for Workplace from Facebook.
Time to build: 45 minutes
Skill level: Easy
If you’re familiar with how the Advent Calendar bot works then scroll down to the next section, otherwise we suggest taking a look at this short overview video that will show you the key screens and features that make up the Advent Calendar bot.
What you need
In order to build this bot you will need:
A trial account or log in for The Bot Platform
Admin status on your Workplace instance so you can connect the bot
A computer that, ideally, is running Chrome
Some festive cheer. Because it’s the Holidays after all!
Step 1: Creating an account
Ok, so the first thing we’re going to do is log into The Bot Platform. You can do this by clicking this link. Sign in using your TBP log in details. If you don’t have a TBP log in then you can sign up for a free trial using this link. Once you’ve done this you’ll need to verify your email. As we’re security conscious, we’ll use this as an opportunity to suggest all users enable 2FA too.
Step 2: Launching the template
Once you’ve verified your email you’ll be logged in to your dashboard. If you’re a new TBP user then you’ll see a blank dashboard like the image below. As you build bots they would appear here.
Click on the blue “Create a new bot” button.
You’ll then see our template dashboard screen. There are a number of different templates you can choose and each has a ‘Learn more’ button that clicks through to more information about that particular use case.
For the purpose of this tutorial, we’re going to click on the ‘Advent calendar bot’ icon.
You’ll then be asked to name your bot. This is the name for how your bot will appear on The Bot Platform. We will come to what your staff see when they use the bot when we connect it to Workplace in step 4.
Type in a name for your bot, for example “Company Advent Calendar”, and click the blue ‘Save’ button.
Congratulations - you have created your first bot! This isn’t live on Workplace yet, but you now have a template that you can start editing!
On the dashboard screen you’ll see a description of the bot and an overview video. Clicking on the ? icon will open this Help Doc.
We’ll come back to the orange bar at the top that says “Connect to Workplace” in step 4.
Click on the blue “Customise your bot” button and you’ll be taken to the message menu.
The message menu contains all the messages that make up a given bot. For the Advent Calendar bot this includes the Welcome messages and then the various messages that contain the daily content and rewards for staff.
Step 3: Reviewing and editing the template
We’re going to start off with the Welcome Message. Click on the blue ‘edit’ button to open that particular message.
The Welcome Message is the first message your staff will see when they start using the bot. It is made up of 1 GIF, 2 message parts and 2 quick replies. If you wish to edit any of these messages then simply click into the text box and change the text or emojis. Equally, if you’d like to change the GIF then simply click the camera icon and select a different GIF from your computer - although try and avoid using GIFs that are larger than 3mb.
If you wish to click through the bot as if you were a user then you can do this by clicking on the text that says ‘Switch to Navigation’. This will make the blue bar change orange and will put you into Navigation mode which means you can click on the various messages to see how the bot is put together. This is a great way of easily seeing which messages you want to edit.
For example, clicking the ‘Yes’ button takes staff to a message called ‘subscribe elf excited’ which is the message your staff see if they confirm they want to receive the daily Advent Calendar messages. If you want to edit any of this then click the ‘Switch to edit’ button in the orange bar to go back into editing mode. Make the required updates and when you’re done click the blue ‘save’ button.
The next message you may need to edit is called ‘Scrooge’. This is the message your staff see if they click the ‘No’ button to opt out of receiving the daily Advent Calendar messages. Make the required updates to this message, and when you’re done click the blue ‘save’ button.
Now we’ll move on to the advent calendar doors themselves. Click on the ‘Messages’ button in the left hand menu and scroll down so you can see the messages called ‘Door X’. The template has 12 doors to represent the 12 days of Christmas, but it’s very easy to add more doors if you want to create an advent calendar with 25 days.
Find the message that’s called ‘Door 1’ and click on the blue edit button. This is the first door that will be sent to staff. The message includes a GIF of a snow globe, a message part, an image of a festive door with the number ‘1’ on and another message part with a button.
If you want to change the GIF you can do that by clicking the camera icon and replacing it with a GIF or image that’s more representative of your company. Equally, you can delete the GIF entirely by clicking the cross icon on the GIF.
You may also want to edit some of the text here - for example by changing “It's the first day of our company advent calendar!” to say the name of your company or organisation. Make any changes that you want to the text by clicking into the text bubble and typing.
Once you’ve updated the text, scroll down and click on the cog icon by the button that says ‘Open Door’. This will open a screen that looks like this.
This is how you link different messages to each other using buttons. You can see here that this button takes the user to a message called ‘Door 1 content’. Click the blue save button. Then scroll down to the bottom of the ‘Door 1’ message and click the blue save button. You’ll now redirect back to the message menu.
Scroll down until you can find a message called ‘Door 1 content’ and click on the blue edit button.
This message includes the content your staff will see if the click on the ‘open door’ button. In this case it’s a GIF and two message parts along with a button that links off to a festive music playlist.
You can edit or change the GIFs and text in the same way we did with the previous messages. And if you wanted to include a different URL for the playlist you could change that by clicking on the cog icon in the button that says ‘Listen’.
This would open a screen like this and you would update the URL by simply pasting the URL of your new playlist in the section that says ‘URL to open’. Click the save button to go back to the ‘Door 1 content’ message. Then click save again to go back to your message list.
You’ll now want to repeat this process for each message looking at both the ‘Door x’ message and then the ‘Door x content’ message.
In terms of the content and rewards that are in the Advent Calendar template already…
Door 1: a music playlist
Door 2: spot the difference
Door 3: festive quiz
Door 4: a riddle
Door 5: funny GIF
Door 6: holiday joke
Door 7: cooking recipes
Door 8: homemade decoration ideas
Door 9: eCard
Door 10: tell a loved one you love them
Door 11: best holiday movie
Door 12: Santa tracker
You’ll want to map out the content or rewards that you’re sending to your staff and decide in which order they appear. Then go in and change the content in each message in the template by following the same steps as above.
Now we’re going to edit the ‘Get Started’ screen. On the left hand panel scroll down and click on ‘Get started message’ under ‘Settings’.
You’ll see the following screen. Most staff interact with a bot for the first time via a broadcast message which means they won’t see this message, but for anyone that finds it organically they will see this text.
Edit or change the text as you wish and then click the blue ‘Save’ button. Then click the ‘Messages’ button in the left hand navigation menu.
Step 4: Connecting to Workplace
OK awesome, your Advent Calendar bot is pretty much finished! We’re now going to connect it to Workplace.
Click on the ‘Messages’ button in the side navigation menu and then click on the ‘Connect to Workplace’ button in the orange bar.
You’ll see a screen that asks you to connect your Workplace account. Click the blue ‘I am a Workplace Admin’ button. If you’re not an admin, you’ll need to involve someone from your company who is in order to add the bot to your Workplace instance.
Ensure all the boxes are ticked on the next screen giving your bot various permissions and then click the red ‘Next’ button at the bottom.
You’ll then be redirected to Workplace’s website and asked which Workplace account you would like to use. Click on the correct one. Note, you may only have one account to choose from here unless you have a test or sandbox instance that you have an account for too.
Now we have the ability to customise how the bot will look to your staff and which groups on Workplace it has access to.
We’ll start off with the bot name, description and icon.
Click the ‘Customise’ button and enter the name you’d like your bot to appear as in the ‘Integration name’ section.
Then update the description of the integration. Change it to something short and sweet like “Get involved in our company Advent Calendar!”
You can change the logo/icon of the bot too. For example, if you wanted the icon to be your company logo or any other icon - click the ‘Update logo’ button, add one from your computer and resize as appropriate.
Then click the blue ‘Save button’.
Now we need to select which groups have access to the bot. You can change this whenever you want, so our suggestion is to start off by connecting it to a test group or Workplace group that you and other Workplace admins or people you might work on the bot with are in.
For example, you may have created a group on Workplace called “bot testing” or “Company Advent Calendar” that only a few people are a member of.
Click the ‘Specific groups’ button and start typing the name of the group or groups you want to connect the bot to. This means only people in those groups will be able to find and access the bot.
Once you’re ready to launch it to the whole company you can add more groups or change the settings to ‘All groups’.
Once you’ve added the correct groups, click the blue ‘Add to Workplace’ button.
Wait a few seconds and then you’ll be redirected back to The Bot Platform and you should now see a green bar at the top of your dashboard that says “Success! Your bot has been successfully connected to Workplace”.
Your bot is now ready to use. Click on the name of the bot in the top left of the dashboard. In the image above we would click on the button that says ‘Company Advent Calendar’ with the Workplace icon next to it.
Click on that and your bot will open in a new tab on your computer. Or, search for the name of your bot on Workplace Chat on your phone.
The screen you’ll see is the Get Started message you edited earlier. Click the ‘Get Started’ button at the bottom of your screen to start using the bot.
Step 5: Sending broadcasts
We’re now going to set up the broadcasts. This allows you to send messages out to your staff.
You can send broadcasts to all staff, members of specific Workplace groups or custom segments of staff.
Click on the ‘Broadcasts’ button in the side navigation. You’ll see a screen like the one below. Click on the blue button that says “Create a broadcast”.
In the section that says ‘Select the message to schedule’ start typing and then select ‘Welcome Message’.
In the choose a target for your broadcast select ‘Workplace Groups’ and in the ‘Send to group(s)’ section start typing the name of the test group you set up earlier, or a group that has people in that you want to test or use the bot.
If you don’t see the group when you start typing then click the ‘Refresh groups’ button and try again.
Scroll down the page and click the ‘Date / time’ section. This will bring up a calendar. Select the day and time you want to send the broadcast. Or, if you want to send it now, click the ‘Set to now’ button. Then press the blue ‘Schedule’ button to save the broadcast.
You’ll then be redirected to your Broadcasts menu where you can edit, test and delete scheduled broadcasts.
You’ll want to continue to set up broadcasts for each of your door messages and scheduling them to send at a specific time on a specific date.
Rather than send these broadcasts to an entire group, we want to send these only to people who have opted in to receive the Advent Calendar messages from the initial Welcome Message broadcast.
In order to do this you will need to go to your Broadcasts panel and select 'Door 1' as the message to schedule. then click on Segments and type in and select 'Elf Subscribe'. Then choose the date and time that Door 1 will send. The click on the blue 'Schedule' button.
By the time you’re finished your broadcasts menu should look like this with all your door messages scheduled and ready to be sent to staff who have opted in to receive the Advent Calendar messages.
And that’s it. You’ve now successfully built a bot that sends your staff fun content and rewards each day in the countdown to the holidays!