slack

slack doesn't recognize github webhook payload format

∥☆過路亽.° 提交于 2019-12-12 03:33:34
问题 I'm trying to create a slack app that uses incoming webhooks. I want my github repository to post to slack whenever the wiki is updated. I believe I've set up the webhook on github just fine, because I can see that it is attempting a delivery whenever I update the wiki. However, there's always the error, "no_text". I think this error means slack is expecting an item named "text," but the payload from github provides none. I verified this by trying two curl commands from the command prompt (I

How to make slackbot reply if the message starts only with a tag

淺唱寂寞╮ 提交于 2019-12-11 23:22:12
问题 so I'm finishing programming a cool slackbot with Nodejs. But i would like the bot to answer only if the command begins with a tag followed by the botname, for example: @joe greet me At the moment i have something like this: if (msg.toLowerCase() == "greet me") bot.postMessageToChannel('general',"wazzup"); The problem is that it only replies if the message is exactly "greet me". I'm not looking for include() function. I just want the bot to answer when tagged and followed by a specific

How to combine slash commands, buttons and dialogs for a menu?

梦想与她 提交于 2019-12-11 18:57:25
问题 My Slack app is started with a slash command, which then posts an ephemeral menu message to the user. That menu has some information and three message buttons. Example: First button allows the user to close the menu Second button allows the user to start an action Third button allows the user to open a dialog for changing options. After the user submits the dialog I want to update the menu message to reflect the changes made in the dialog. However, after the user submits the dialog I can no

Slack Upload : Error while trying to upload using Curl

眉间皱痕 提交于 2019-12-11 17:18:22
问题 I am trying to upload a local file using curl command which I got to know about from here but while trying to run the command, It is not working and throwing error: {"ok":false,"error":"not_authed"} Command I am running is: curl -F file=testsend.txt -F channels=#channel -F token='token' -F filetype=post https://slack.com/api/files.upload 回答1: According to the error message you got, the access token you are using does not seam to be valid. Please double-check that you are using a valid access

How to filter bot users belong to my app when I listen to member_joined_channel event

拜拜、爱过 提交于 2019-12-11 15:54:49
问题 I want to know when bot user (belongs to my app) is added to private channel , I know member_joined_channel event will fired for all invites in the private channel but I am interested in the event only when my bot user is added to private channel and ignore other invites. Is there any way I can filter? My app is installed in different workspaces . Bot user id of same app is different for different workspace so I cannot filter by bot user id. 回答1: Every time your app is installed into a new

Microsoft Bot Framework Bot duplicate responses in Slack

时间秒杀一切 提交于 2019-12-11 15:26:54
问题 I have a simple code to test bot responses in my RoodDialog.cs code: if (activity.Text.Trim().ToLower() == "--hi") { IMessageActivity replyMessage = context.MakeMessage(); replyMessage.Text = $"Hello {activity.From.Name}"; await context.PostAsync(replyMessage); } Works as expected in Skype, Emulator and Facebook Messenger, however sends duplicate response messages ("Hello {Name}") in Slack. I think its either Slack configuration or a Bot Framework issue. Anyone seen and resolved this? Thanks

Add permissions for user on Slack

不羁岁月 提交于 2019-12-11 15:19:27
问题 How can we add more scopes/permissions for a user when he signs into slack using Sign in to Slack button. I have added the scopes in the Outh permissions/scopes on my Slack App.it works for the primary owner but not for other users. I have a similar question here. I think I figured out the that I have to add permissions but cannot figure out how. I tried adding it to the initial oauth flow of the sign in with Slack button but it says that I am not allowed to use other scopes with identity

Uploading file to Slack API files.upload with jquery

六眼飞鱼酱① 提交于 2019-12-11 15:15:37
问题 I'm trying to, on a webpage, select a file and post it in Slack via the Slack API. I was originally doing: var request = require('request'); $(".submit").click(function(){ request.post({ url: 'https://slack.com/api/files.upload', formData: { token: "myTokenHere", title: "Image", filename: "image.png", filetype: "auto", channels: "mychannel", file: document.getElementById('idofuploadelement').files[0] }, }, function (err, response) { console.log(JSON.parse(response.body)); }); So then I

Slack: How can I remove a message's action buttons without Slack appending “edited”

拈花ヽ惹草 提交于 2019-12-11 15:12:46
问题 I have a Slackbot message that has action buttons (see here). When a user click's a button, we perform a bit of work on our server and then use chat.update to remove the action buttons and update the message's footer: removeButtons(reply, convo, footer) { const data = reply.original_message; delete data.attachments[0].actions; data.channel = reply.channel; if (footer) { data.attachments[0].footer = footer; } this.bot.api.chat.update(data, (res) => { }); } Everything is working great but Slack

How do I create a logic app to copy pictures from slack channel?

做~自己de王妃 提交于 2019-12-11 15:05:00
问题 I want to automate copying pictures that arrive in a slack channel to go to an Azure Blob. I found some docs on connecting to Slack and was able to create a When File Is Created task The next thing I tried was a Copy blob step. However this does not seem right. [Update] From George's help I added the HTTP task. Here is what I see in the code view of the Slack trigger or in modified text format { "$connections": { "value": { "slack_1": { "connectionId": "/subscriptions/subscriptionid