messages into Slack with customization and rich formatting. • Outgoing Webhooks • Send messages from Slack to your service in real-time. • Bot Users • Connect to Slack to read and write as a real-time bot.
slackclient import SlackClient # Token found at https://api.slack.com/web#authentication token = "xoxb-52095439187-CYPqixxxxxzwR9MoriR" sc = SlackClient(token) if sc.rtm_connect(): while True: results = sc.rtm_read() for result in results: if 'type' in result: if result['type'] == u'message' and not('subtype' in result): channel = result['channel'] text = result['text'] user = result['user'] if channel != u'C02HKPG5U' and user != u'U1J2TCX5H': # Filter out: # C02HKPG5U ==> General channel # U07SJTAMC ==> Bot it's self try: sc.rtm_send_message(channel, text) except Exception, e: print e print result time.sleep(5) else: print "Connection Failed, invalid token?" Python
S E N G E R B O T • 1. Create a Facebook App and Page • 2. Setup Webhook • 3. Get a Page Access Token • 4. Subscribe the App to the Page https://messengerplatform.fb.com/
Create Skype bot • 2. Create Microsoft Application • 3. Paste Application ID to Skype bot • 4. Add your bot to contact https://developer.microsoft.com/en-us/skype/bots/docs/api/chat