Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
mario@yodel.io and mike@yodel.io | YodelTalk, Inc.
2005Primitive natural language processing like ELIZA.
Slack facts
2.7 million DAU
800,000 paid slack accounts
60,000 teams
320 minutes average time on slack on weekdays / user
...
Transactional and conversational bot
Hey @Yodel,
can you please call
Nina for me?
Transactional and conversational bot
Web API
RPC webhooks
RTM API
Real Time Messaging over Websocket
easy complex
… or pla...
What to use?
Get message on trigger
and/or in public rooms
(manual setup)
/slash commands
Post on external event
Get acces...
Building your bot
1. Create your bot at https://api.slack.com/apps/new
2. Authenticate via OAuth
3. Send or receive messag...
https://api.slack.com/docs/slack-button#button-widget
def create
Account.find_by(token: params[:state]) do |account|
account.slack = request.env['omniauth.auth']
end
redirect_t...
def good_morning(account)
query = {
token: account.slack_token,
channel: '#vienna-bots-meetup',
username: 'HAL 9000',
atta...
def open_pod_bay_doors
return head :forbidden unless request_is_coming_from_slack?
unless humans_are_trying_to_shut_me_dow...
{
"username": "HAL 9000",
"text": "Hello, Dave. You're looking well today. Have you
visited http://www.ibm.com/ lately?",
...
Attachments and Advanced Formatting
Preview at https://api.slack.com/docs/formatting/builder
Getting into the App directory
Submission checklist!
New scopes and Slack button
Short description (10 words) and Long des...
Tips and Tricks
WTF is Unfurling?
Get your scopes future proof!
Instant changes on texts possible.
Create your own bot use...
Questions?
An introduction how to build bots for Slack and get them listed in the app directory.
An introduction how to build bots for Slack and get them listed in the app directory.
An introduction how to build bots for Slack and get them listed in the app directory.
An introduction how to build bots for Slack and get them listed in the app directory.
An introduction how to build bots for Slack and get them listed in the app directory.
An introduction how to build bots for Slack and get them listed in the app directory.
Nächste SlideShare
Wird geladen in …5
×

An introduction how to build bots for Slack and get them listed in the app directory.

428 Aufrufe

Veröffentlicht am

Best practice. Limitations. Transactional vs. Conversational.
Talk at the first Vienna Bots Meetup.
https://www.facebook.com/events/919788214793812/

Veröffentlicht in: Internet
  • Als Erste(r) kommentieren

An introduction how to build bots for Slack and get them listed in the app directory.

  1. 1. mario@yodel.io and mike@yodel.io | YodelTalk, Inc.
  2. 2. 2005Primitive natural language processing like ELIZA.
  3. 3. Slack facts 2.7 million DAU 800,000 paid slack accounts 60,000 teams 320 minutes average time on slack on weekdays / user max 1 million users logged in at the same time
  4. 4. Transactional and conversational bot Hey @Yodel, can you please call Nina for me?
  5. 5. Transactional and conversational bot Web API RPC webhooks RTM API Real Time Messaging over Websocket easy complex … or play around with Meya
  6. 6. What to use? Get message on trigger and/or in public rooms (manual setup) /slash commands Post on external event Get access to the full conversation Web API RTM
  7. 7. Building your bot 1. Create your bot at https://api.slack.com/apps/new 2. Authenticate via OAuth 3. Send or receive messages
  8. 8. https://api.slack.com/docs/slack-button#button-widget
  9. 9. def create Account.find_by(token: params[:state]) do |account| account.slack = request.env['omniauth.auth'] end redirect_to root_url end OAuth
  10. 10. def good_morning(account) query = { token: account.slack_token, channel: '#vienna-bots-meetup', username: 'HAL 9000', attachments: JSON.dump([{ text: "Hello Mario. You're looking well today." }]) } HTTParty.post( 'https://slack.com/api/chat.postMessage', query: query ) end Send messages
  11. 11. def open_pod_bay_doors return head :forbidden unless request_is_coming_from_slack? unless humans_are_trying_to_shut_me_down? render fulfill_human_commands(params[:text]) else render text: "I'm sorry Mario, I'm afraid I can't do that" end end Receive messages (aka slash commands)
  12. 12. { "username": "HAL 9000", "text": "Hello, Dave. You're looking well today. Have you visited http://www.ibm.com/ lately?", "attachments": [ { "text": "Yes", "color": "#00ff00" }, { "text": "Read my lips!", "color": "#ffff00" } ] } Attachments and Advanced Formatting
  13. 13. Attachments and Advanced Formatting Preview at https://api.slack.com/docs/formatting/builder
  14. 14. Getting into the App directory Submission checklist! New scopes and Slack button Short description (10 words) and Long description Install instructions, support page and privacy policy What are you doing? Which scopes do you use and why? Be nice. Give them a test account.
  15. 15. Tips and Tricks WTF is Unfurling? Get your scopes future proof! Instant changes on texts possible. Create your own bot user. Apps are not sharable. Get your environments ready. Production and Staging/Dev.
  16. 16. Questions?

×