1. Find the slides here: http://tiny.cc/botman-spark
Follow me on Twitter and/or tweet at me. @tessamero
By Tessa Mero
Let’s Build a Chatbot
2. SUMMARY
• Who Am I?
• What Are Chat Bots?
• What are the Benefits?
• Integrations vs Bots
• Getting Started with a Collaboration API
• Create a Chat Bot using Botman and Cisco Spark
• Using CodeAnywhere
• Create Webhook Events
• Test Your Bot!
3. What You Will Need
• Cisco Spark API Account:
https://developer.ciscospark.com/
• Cisco Spark Web Account:
• https://web.ciscospark.com/
• Create CodeAnywhere Account:
https://codeanywhere.com
Bot assistance preinstalled in Windows versions from 1997 to 2003.
Talk about Siri as a bot
Amazon echo as a bot
Amazon Alexa integrating with the Tesla Model S.
Make commands to make other things do things.
Jason Geocke from Cisco doing this integration.
Chat bots are becoming more popular and will become the future of technology.
* Use Case: Customer service interactions. The bot is an AI to grab information and package it and put it in front of a human to finish the interaction.
“I’ve analyzed the Silicon Valley Bot Startup trend and created a handy venn diagram to help explain it”
Bots are designed to solve a problem you have in your work flow or business.
You can create or use existing plugins to extend your chat bot to do things.
Such as the SmartSheet (which is a competitor of google spreadsheets), to send notifications when there is a change in your spreadsheet.
It also lists the commands you can make to trigger activities.
Mention Spark Innovation Fund?
In our company Spark Chats, we have a room with a MemeBot that one of my colleagues created.
You type a few words, followed by the name of the meme to trigger it, and the bot will create a meme. (There’s an API for retrieving meme images and overlaying the text).
A bot can do things as itself. It has its own account and authentication. If you do an integration, it’s going to complete tasks as YOU.
For example, the Out of Office Assistant integration. It lists the requests you can do with it.
In the Spark API scope, you can see the different levels of access that your integration can require.
You can find all of this in the API documentation.
We also have a collection of POSTMAN calls. Just ask us later for more information.
In this way, it’s its own entity, which is an authentication on your account.
Go to developer.ciscospark.com and click on Sign Up on the far right top corner.
Make sure you have both tabs open since you’ll be alternating between the web application and your developer account.
Log in at “Spark for Developers” and open the "My Apps" menu.
You will access the “New Bot” creation form below.
Fill in a name, a unique email identifier, and specify a publicly accessible image URL with a minimal resolution of 512x512 pixels. Feel free to pick this image example for the sake of this lab. (http://bit.ly/SparkBot-512x512)
Note that you will not be authorized to pick the email "my-awesome-bot@sparkbot.io" as it is already reserved. Make sure to replace future mentions to the bot email you have chosen.
Give people some time to type this URL in or find their own bot picture they want to use
Click “Add Bot” to get your Cisco Spark Bot created.
Your Bot's access token is displayed. Paste it in a safe place as it won’t show up again, and we will use it in steps 2 and 3 of this lab.
Note that a Cisco Spark Bot access token lasts 100 years. If you ever loose or reveal it, you can come back to this Bot details page and regenerate an access token. The previously issued token will be automatically deprecated.
Your bot can now be added to any Cisco Spark Room by specifying its email: my-awesome-bot@sparkbot.io in our example.
Go to your Cisco Spark client, and create a new room with your Bot as a participant.
Go into your Spark app. You can now add your bot to the chat. Even though you can chat with your bot, you won’t see him answer... as we haven’t connected it yet to any custom code logic. We’ll work on this in the next steps.
Go into your Spark app. You can now add your bot to the chat. Even though you can chat with your bot, you won’t see him answer... as we haven’t connected it yet to any custom code logic. We’ll work on this in the next steps.
Go into your Spark app. You can now add your bot to the chat. Even though you can chat with your bot, you won’t see him answer... as we haven’t connected it yet to any custom code logic. We’ll work on this in the next steps.
A PHP Chatbot Framework that allows you to create code easily with different bot APIs
A PHP Chatbot Framework that allows you to create code easily with different bot APIs.
You can click on “Documentation” on the homepage for more information on how to set it up with different drivers.
Go to File->Save to save your app
In this section, we will create REST Webhooks so that our bot starts receiving traffic from Cisco Spark.
Every API has an API reference, and there you can find the Webhooks guide.
Go to the developer portal and find the API reference to the left and click on Create a webhook.
Open the list of Webhooks supported by Cisco Spark, and look for the event entries needed by your bot:
Messages / Created: a new message got posted into a room
Memberships / Created: someone joined a room that you are in
Click on the Webhooks entry in the API Reference section on the left, and select the “Post” method. This will drive you to the Create a Webhook form.
Fill in the fields as shown in the screenshot:
Authorization header: change the access token to your bot’s, and do NOT remove the "Bearer " prefix,
targetUrl: paste the public URL of your bot on Cloud9,
resource and event: make sure to fill in the “messages” and “created” values, as it is only default placeholders you see in the form,
last fields “Secret” and “Filter” are optional. Leave them blank.
In the previous steps, you deployed a Cisco Spark bot sample on Cloud9, launched a new instance under the identity of the Bot Account you created, and created Webhooks to start receiving events at your bot public URL on Cloud9. Now comes time to chat with your bot.
Reach to the Cisco Spark room you created in step 1.
Enter /hello.
Check your bot's response!
Nothing is supposed to happen