slack

Sending message to different channel via slack webhook fails

半城伤御伤魂 提交于 2019-12-18 09:34:44
问题 I'm not sure if I am understanding the way how to use webhooks quite right, but: I want to send messages in different channels or to different users (not at once), without being involved in that conversation. My problem: I can only create webhooks for specific users, so I end up having a unique URL for every user / channel? If I use something like the "channel" parameter or even the "setReceipent" method from the library I use, it doensn't have any effect and only the channel / user the

Slack POST multiple messages to a channel at once

此生再无相见时 提交于 2019-12-18 07:05:56
问题 I need to post multiple bot replies (responses determined dynamically) to the same channel. The obvious way seems to be to do an HTTP POST for each message in succession using this API method: https://api.slack.com/methods/chat.postMessage Is there a way to send messages to Slack in bulk to post to the same channel? The order in which the messages get rendered need not be important for me. 回答1: No, there is no bulk variant. So you basically need to build your own bulk message sender. Keep in

Receiving too many requests in my Bot user from slack

痞子三分冷 提交于 2019-12-17 21:15:28
问题 I am trying to implement a bot user in slack, but right now when i send a message to slack as a user, my bot gets more messages requests than it should. The event that I have added to my bot user is message.groups. I don't know if the events can interferer with the normal flow of the conversation. In this log USER REQUEST is what the user sent to the bot and BOT AWSER is what bot sends. As you can see slack is receiving the same message (event_time is the same) two times in a row, when i send

Slack dialog doesn't close after form submission

你。 提交于 2019-12-17 14:57:13
问题 I created a slack dialog/form to collect some information from users; The form renders just fine and I can fill out the form without a problem but it doesn't close after I click Submit, instead it gives an error: We had some trouble connecting. Try again? I've already sent back a 200 status OK as in the documentation. // menu is the end point of my interactive messages app.post('/menu', (req, res) => { console.log('from form submission:', req.body.payload) res.sendStatus(200); }) What could

Creating a Slack Webhook programmatically

≡放荡痞女 提交于 2019-12-14 02:18:41
问题 Is there a way I can use the Slack API to create an incoming and outgoing webhook for a channel I just created? 回答1: No, I do not think that feature exists, but you can just use any existing webhook with the newly created channel or use the Event API to get the same result. Incoming Webhooks You can redirect an incoming webhook to any channel by providing the channel name as parameter in your call. (see Channel override) Outgoing Webhooks Your existing outgoing webhook will work with any

Using Slack, how do you send direct message to user based on their "Member ID?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 10:51:26
问题 How do you send a direct message to a user in Slack, using their unique "Member ID". Slack seems to only accept a Slack handle as an acceptable username. I'm new to Slack and thanks in advance for the help (please let me know if this needs to be moved, etc.). 回答1: Assuming you meant user ID when you said "member ID", you can use that as channel parameter in chat.postMessage to send a direct message to that user. Example for user with User ID U12345678 : curl -X POST "https://slack.com/api

Receive message from slack bot

此生再无相见时 提交于 2019-12-13 07:29:34
问题 I am quite confused on Slack bot using Python. I want to be able to receive messages sent to by bot: client = SlackClient(API_TOKEN) if client.rtm_connect(): while True: print client.rtm_read() time.sleep(1) else: print "Connection Failed, invalid token?" Then I send a message to my bot in slack. But I don't get the message. How do I start sending message to my user? Also, is it possible to include the bot in all channels? So if I'm in any channel, I want to be able to say @myBot args 123 回答1

Prometheus Slack alert with FAQ url

帅比萌擦擦* 提交于 2019-12-13 05:42:19
问题 I have a Prometheus alert like this: - alert: NginxCrashLoop annotations: description: Nginx at {{ $labels.pod }} is in Crash Loop identifier: '{{ $labels.node }}' runbook_url: https://sites.google.com/a/domain.com/bi/faq/nginx expr: | rate(kube_pod_container_status_restarts_total{container="frontend"}[2m]) * on(namespace, pod) group_left(node) kube_pod_info * 3600 > 3 labels: severity: critical and a Go template for Slack custom alerting: {{ define "__single_message_title" }}{{ range .Alerts

Slack outgoing webhook :URL(s)

蓝咒 提交于 2019-12-12 23:27:47
问题 Can anyone please explain the URL(s) in slack outgoing webhooks configurations? Thanks 回答1: The URLs in outgoing webhooks are locations that you control where, when certain conditions are met, Slack's servers will send a HTTP POST to the URL with the data described in the outgoing webhooks docs and you'll have a chance to respond with a simple messsage. You'll need a server or service that is reachable by Slack to work with outgoing webhooks. Here's another good overview of outgoing webhooks.

Node.js: How to send a direct message in Slack with MS Bot Framework?

孤街醉人 提交于 2019-12-12 22:46:56
问题 I am trying to create a Slack bot using LUIS where when the bot sees a greeting in a channel it is added to, it sends a direct message to the user that sent the greeting. I have looked at Issue #431 and wrote a bot. Here is my code: var builder = require('botbuilder'); var restify = require('restify'); // Setup Restify Server var server = restify.createServer(); server.listen(process.env.port || process.env.PORT || 3978, function () { console.log("%s listening to %s", server.name, server.url)