Questions tagged [slack-api]

Slack is a real-time messaging, archiving and search tool for modern teams. Use this tag for programming questions related to the Slack API including the Web API, the RTM API and the Events API.

Slack is a real-time messaging, archiving and search tool for modern teams.

Use this tag for programming questions related to the Slack API including the Web API and the Events API.

Read more about the Slack API here.

2911 questions
19
votes
1 answer

Get a slack notification if mentioned on Github

Zapier has a very cool feature you can add which will send a slack notification every time you are mentioned on github. https://zapier.com/apps/github/integrations/slack/1596/send-a-github-new-mention-to-slack-as-a-new-message Unfortunately it is…
tgreen
  • 1,720
  • 1
  • 16
  • 28
19
votes
1 answer

Override DND on a channel?

I want to set up an #emergency channel in which important messages will come from an incoming webhook and will contain @channel in them. I want these notifications to be seen immediately by all who have joined the channel, regardless of the time or…
Dan Tenenbaum
  • 1,809
  • 3
  • 23
  • 35
19
votes
3 answers

channel_not_found exception while sending the message through incoming webhook

Am using incoming webhooks to send messages, however am overiding the channelID to send to particular channel(as mentioned in here:https://api.slack.com/incoming-webhooks) by using something like this { "channel": "#my_channel", "text": "This…
prabhakar Reddy G
  • 1,039
  • 3
  • 12
  • 23
18
votes
3 answers

Where do I get `thread_ts` to start a Slack thread with an incoming webhook?

On Slack's incoming webhook documentation, they mention including the thread_ts in the request body to start a thread. { "text": "Hello, world.", "thread_ts": "12345.6789" } When I make the POST request to my incoming webhook url, the…
hmatt1
  • 4,939
  • 3
  • 30
  • 51
18
votes
4 answers

slack events api triggers multiple times by one message

I'm using the Slack API to get a link from a Slack workspace. It works except when a message is posted, it triggers more then once. Everytime. Here is the code I have: exports.slack = (req , res) => { var message = req.body; if…
olli208
  • 323
  • 2
  • 10
18
votes
1 answer

Simultaneously "Add to Slack" and "Sign in with Slack"

I'm working on a Slack app that also links with a web app, which users can log into using Slack. It's very common for a new user to need to both log into the web app and add the app to Slack. I'd like to let them do this with a single trip through…
aldel
  • 6,489
  • 1
  • 27
  • 32
18
votes
2 answers

How to detect a string and replace with a URL in a user-generated message

New at Slack programming and, admittedly, it's been a while since I've developed much of anything. I'm looking for direction on how to automatically convert any ticket # posted by anyone in any channel and convert it to a deep link into our…
Jeff Gilbert
  • 183
  • 1
  • 6
18
votes
1 answer

How to replace the buttons (attachment) only w/ Slack interactive buttons response

I've managed to create a simple interactive button Slack app using a Google Apps Script (GAS). I know how to replace the original message w/ the response, but I would like to replace only the buttons, as demonstrated (but not clearly explained)…
Matt
  • 795
  • 1
  • 6
  • 20
18
votes
10 answers

Slack API: Retrieve all member emails from a slack channel

Given the name of a slack channel, is there a way to retrieve a list of emails of all the members in that channel? I tried looking in the slack api docs but couldn't find the method I need to make this happen (https://api.slack.com/methods).
user5844628
  • 397
  • 1
  • 5
  • 15
18
votes
3 answers

Slack API chat.update returns 'not_authed' error

I have a google script running as a webapp to handle the backend of a slack app. The app has been Authenticated and I have the OAUTH token from this. I can currently post to a channel with button actions using the chat.postMessage using the…
Jamie
  • 271
  • 1
  • 2
  • 11
18
votes
1 answer

How do I post a snippet to slack channel

I am trying to post log info to slack and some of these logs can get pretty big. Is there a way to send it as a snippet so that slack doesn't chunk the text into multiple messages?
Jerrod Horton
  • 1,605
  • 1
  • 15
  • 30
18
votes
3 answers

Get a list of all private channels with Slack API

I've been trying to get a list of all "groups" in my Slack team. However, even with admin privs, groups.list only provides the groups that the token owner's account belongs to. The closest solution I've seen in my research involves getting a bot to…
shaun m
  • 440
  • 1
  • 5
  • 15
17
votes
7 answers

Send multiple files to Slack via API

According to Slack's documentation is only possible to send one file per time via API. The method is this: https://api.slack.com/methods/files.upload. Using Slack's desktop and web applications we can send multiple files at once, which is useful…
Paulo Salgado
  • 437
  • 4
  • 14
17
votes
1 answer

Slack WebApi block section, don't wrap line of text

My type: section block looks pretty standard. { "type": "section", "text": { "type": "mrkdwn", "text": "A message *with some bold text* and _some italicized text_." } } I realized that Slack wraps lines longer than ~85 characters (I…
lapsus
  • 2,915
  • 2
  • 32
  • 61
17
votes
3 answers

How to create a Slack message containing an uploaded image?

I'd like to create a message in the #general channel of my Slackspace from within a PHP script. The message should contain text and an image which was created locally on-the-fly. I've already created an App, generated an bearer token and have…
T-Regex
  • 179
  • 1
  • 2
  • 8