Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
January 2017 – NYC Ports & Logistics Hackathon
Find the content here: http://bit.do/spark-bot
Follow us on Twitter and/or ...
SUMMARY
• Who Are We?
• What Are Chat Bots?
• What are the Benefits?
• Integrations vs Bots
• Getting Started with a Colla...
What You Will Need
• Cisco Spark API Account: https://developer.ciscospark.com/
• Create Cloud9 Account: http://c9.io
• [o...
Objective
Who is Tessa?
* Developer Evangelist
* Teacher
* Open Source Contributor
* Community Leader
* Mother
Who is Austin?
* Developer Evangelist
* Technologist
* Problem Solver
* Teacher
* Connector
What are Chat Bots?
Clippy!
What are the Benefits?
Integrations vs Bots
An integration acts as YOU
and can see and do
the things you can do.
A bot appears as another
member of the room, but
can only see messages
that mention it.
Getting Started with a
Collaboration API
In this case, we will use Cisco Spark
API:
https://developer.ciscospark.com/
Then Log In!
Create an Account on the API web...
TODO
TODO
Creating a Chat Bot
Click on “My Apps” and Add New (+)
Select ”Create a Bot”
Add a Bot Image
http://bit.ly/SparkBot-512x512
Copy API Access Token
Copy API Access Token
Deploy a bot on Cloud9
c9.io/signup
A closer look at the Github URL:
https://github.com/CiscoDevNet/node-
sparkbot-samples.
Install Node.js in Cloud9
• In Cloud9, look at the shell terminal at the bottom.
• Type: “npm install” – The nodejs librar...
Create Variables
• Click the ENV button at the bottom right of the Cloud9
Terminal
• Create two variables:
• DEBUG || spar...
Make Your Application Public to Share
Create Webhook events
Create Cisco Spark Webhooks
200 Success!
• Click “Run”
• See a “200/success” displayed – webhook assigned to unique
identifier
• Fired off every time ...
Create Another Webhook
• Receive an event every time our bot is added to a room
• Modify “resource” field: replace “messag...
Test your Cisco Spark Bot
Test Bots Response – type /hello
Mention your bot in Group rooms
Type /hello to test Group chat with bot
Go Further?
• Add a few breakpoints in helloworld.js, restart in debug mode
• Add some commands. Find samples here:
https:...
Thank You
@tessamero
@auhyland
http://bit.do/spark-bot
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Building Chatbots
Prochain SlideShare
Chargement dans…5
×

Building Chatbots

173 vues

Publié le

chatbots

Publié dans : Technologie
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Building Chatbots

  1. 1. January 2017 – NYC Ports & Logistics Hackathon Find the content here: http://bit.do/spark-bot Follow us on Twitter and/or tweet at me. @tessamero and @auhyland By Tessa Mero and Austin Hyland Building Chat Bots Made Easy
  2. 2. SUMMARY • Who Are We? • What Are Chat Bots? • What are the Benefits? • Integrations vs Bots • Getting Started with a Collaboration API • Create a Chat Bot • Using Cloud9 (c9.io) • Create Webhook Events • Test Your Bot!
  3. 3. What You Will Need • Cisco Spark API Account: https://developer.ciscospark.com/ • Create Cloud9 Account: http://c9.io • [optional] JSON Viewer: https://chrome.google.com/webstore/detail/json- viewer/gbmdgpbipfallnflgajpaliibnhdgobh
  4. 4. Objective
  5. 5. Who is Tessa? * Developer Evangelist * Teacher * Open Source Contributor * Community Leader * Mother
  6. 6. Who is Austin? * Developer Evangelist * Technologist * Problem Solver * Teacher * Connector
  7. 7. What are Chat Bots?
  8. 8. Clippy!
  9. 9. What are the Benefits?
  10. 10. Integrations vs Bots
  11. 11. An integration acts as YOU and can see and do the things you can do.
  12. 12. A bot appears as another member of the room, but can only see messages that mention it.
  13. 13. Getting Started with a Collaboration API
  14. 14. In this case, we will use Cisco Spark API: https://developer.ciscospark.com/ Then Log In! Create an Account on the API website
  15. 15. TODO TODO
  16. 16. Creating a Chat Bot
  17. 17. Click on “My Apps” and Add New (+)
  18. 18. Select ”Create a Bot”
  19. 19. Add a Bot Image http://bit.ly/SparkBot-512x512
  20. 20. Copy API Access Token
  21. 21. Copy API Access Token
  22. 22. Deploy a bot on Cloud9
  23. 23. c9.io/signup
  24. 24. A closer look at the Github URL: https://github.com/CiscoDevNet/node- sparkbot-samples.
  25. 25. Install Node.js in Cloud9 • In Cloud9, look at the shell terminal at the bottom. • Type: “npm install” – The nodejs libraries used by our code sample get downloaded to your Cloud9 Workspace • Now go to helloworld.js under “examples” • Click “Run” at the top
  26. 26. Create Variables • Click the ENV button at the bottom right of the Cloud9 Terminal • Create two variables: • DEBUG || sparkbot • SPARK_TOKEN || yourtokenkey
  27. 27. Make Your Application Public to Share
  28. 28. Create Webhook events
  29. 29. Create Cisco Spark Webhooks
  30. 30. 200 Success! • Click “Run” • See a “200/success” displayed – webhook assigned to unique identifier • Fired off every time a new message is added to a room your bot is a member of
  31. 31. Create Another Webhook • Receive an event every time our bot is added to a room • Modify “resource” field: replace “messages” with “memberships” • Click “Run” again • See a ”200 / success” message!
  32. 32. Test your Cisco Spark Bot
  33. 33. Test Bots Response – type /hello
  34. 34. Mention your bot in Group rooms
  35. 35. Type /hello to test Group chat with bot
  36. 36. Go Further? • Add a few breakpoints in helloworld.js, restart in debug mode • Add some commands. Find samples here: https://github.com/CiscoDevNet/node-sparkbot-samples • Note: Lots of nodejs bot frameworks exist for Cisco Spark, from basic to advanced in various languages.
  37. 37. Thank You @tessamero @auhyland http://bit.do/spark-bot

×