slack-api

AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox instead of sockets

妖精的绣舞 提交于 2019-12-07 08:00:36
问题 I'm getting this error on app engine using flask to make a Slack bot. It happens whenever I send a POST request from Slackbot. Unfortunately, the url provided in the error is a dead link. How do I go about using sockets instead of URLFetch? /base/data/home/apps/[REDACTED]/lib/requests/packages/urllib3/contrib/appengine.py:115: AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox instead of sockets. To use sockets directly instead of URLFetch see https://urllib3

Slack DM to a user not in `im.list`

孤者浪人 提交于 2019-12-07 01:48:43
问题 I'm implementing a slack ops bot that will notify users of job completion on a build server. It needs to be able to DM users on job completion. I've setup a bot user as per the instructions @ https://api.slack.com/bot-users. To send a DM to a particular user, chat.postMessage takes the first argument (channel) as either a @username or a IM channel's ID as per the documentation @ https://api.slack.com/methods/chat.postMessage#channels . To get the IM channel ID of a user, im.list can be used.

Create and get new channel incoming webhook in slack

断了今生、忘了曾经 提交于 2019-12-06 11:45:53
问题 I just created a channel via Slack Api using channels.create method. How do I add incoming webhook and get the URL programmatically? I have other tools that will use it further. 回答1: You can not create new incoming webhooks programmatically, but you don't have to. Just override the channel property on an existing incoming webhook for your current Slack team to use the new channel. Example: { "text": "This is a line of text.\nAnd this is another one.", "channel": "channel-name" } Note that

Slack Event API for Bot Mentions

╄→尐↘猪︶ㄣ 提交于 2019-12-06 11:15:39
问题 I'm building a Slack bot using a Slack App. I have managed to authorise and am successfully receiving events via the Event API. I'm trying to find out how to listen only for direct mentions of the bot. Therefore it should fire an event when someone messages a public or private channel AND when the bot is directly tagged like @bot Public/private Slack Channel Example: Daniel: Hi there bot (does not trigger) Jeremy: @bot hi there (triggers Event API) Is there a Slack Event that does this? Or is

Attach meta data / custom data to slack messages sent through the API

家住魔仙堡 提交于 2019-12-06 06:35:43
问题 I am developing a series of Slack apps for my workspace, and some of them are meant to interact with the content (messages) delivered by the other apps : extracting content IDs that may be referred to by other messages A concrete example : Suppose I have an app A "FindUser" that is capable of giving me the user profile when a slack user types find me@example.com , and it replies in the thread with a formatted view of the user profile I am developing an app B "EditTags", which basically gives

How to use Slack's OAuth2 with a Java desktop application

点点圈 提交于 2019-12-06 02:29:58
Is there a way to authenticate a java desktop application with Slack using OAuth2? I am trying to follow Slack's guide . I am getting stuck because it says you get the access token inside of the redirect uri of your application. But since the app I am making does not exist inside of the web browser, is there anyway I can do this? Can my java application launch a localhost site that it can communicate with to use as the redirect uri? If so, how? Desktop app as internal integration Before we get into more details please note that there is an easy solution if you plan to use your desktop app for

Way to get timestamp of last activity for all Slack users

牧云@^-^@ 提交于 2019-12-05 21:50:22
I am building a Python script which retrieves a set of information for all Slack users of the organization that I work. Currently, I was asked by the stakeholders to retrieve the last time that our organization's users were active on Slack. I came across the users.getPresence method but this can only return a timestamp for the owner of the token. Has anybody worked on that before? Thanks. It depends a bit how you define "active on Slack". If getting the date and time a user was logged in last is enough, take a look at team.accessLogs , which will give you the timestamp of the last login for

Call Slack API via VBScript Rule in Outlook

时光怂恿深爱的人放手 提交于 2019-12-05 19:26:09
I'm trying to run a rule in Outlook that runs a VBScript which calls a Slack.com webservice and updates one of my Slack Channels with a specific message. Current state -- i just want it to post a static message. Future state i'm going to try to use RegEx to parse out certain data from the email and post it to my slack channel. From frankensteining a few scripts i found online, this is what i have (but doesn't quite work) Hoping someone can help... Function ProcessSend() Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.4.0") Set oXMLDoc = CreateObject("MSXML2.DOMDocument") strEnvelope = "payload={"

How can I make it so that slack bots can use Giphy?

不想你离开。 提交于 2019-12-05 11:08:02
问题 For some reason, the existing Giphy app for slack does not allow bots to call a GIF from giphy.com If I type "/Giphy sad", the Giphy app will automatically load a sad GIF of somekind from Giphy.com But if my slackbot does it, or my hubot, or my twitterbot, or any bot that I create, even if the text is identical, it won't work. I'm assuming this is because giphy intentionally excluded bots from being able to call the command? Or is it that bots can't call commands in general? So in addition to

Slack API - chat.update : “message_not_found”

馋奶兔 提交于 2019-12-05 09:17:39
I'm using the 'slack-node' npm package to build a simple Slack App for my team. The initialization of the bot works great so far. I got it to post a message to a channel after using a custom slash command. This message contains an interactive button, which after the user pressed on it, the message should update. From my log: // User uses /event slash command 18:48:50 UTC - - Received [POST] to path [/event] // API response after posting the message { ok: true, message_ts: '1506538130.000343' } // Incoming request after user pressed the button 18:49:32 UTC - - Received [POST] to path [/button