Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 871 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 871 Bytes

python-slack-bot

Pizza ordering Slack chatbot

Slack App creation -

  • Signup on Slack and build a new app
  • Enable "Incoming Webhooks"
  • Enable "Interactive Components" and enter your servers address for "Request URL" (publicly accessible url where your python scripts are running). ex - http://mychatbot.com/slack/message_action
  • In "OAuth and Permissions" provide these Scope element access - chat:write incoming-webhooks
  • Add the app in your desired Channel.

Copy the Bot User OAuth Access Token and replace it in the code.

Python Requirements -

pip install flask pymongo slackclient

If you are like me, running flask on Raspberry pi (or any local machine) that is being firewall/NATs, use SSH Tunneling. I have used this simple service that works without any installations.