Slack bot open message with groupSlack: Retrieve all messagesHow to join a Slack channel as a Real Time Messaging bot user?slack bot respond to messages with a mentionCan a slack bot message another bot?Slack Bot Interactive MessagesHow can a Slack bot detect a direct message vs a message in a channel?Sending direct message to a bot in slack and get the responseSlack scopes and bot usersSlack bot permission to delete a message
Is there a standard definition of the "stall" phenomena?
Array or vector? Two dimensional array or matrix?
Taking advantage when HR forgets to communicate the rules
Advice for making/keeping shredded chicken moist?
Why does "sattsehen" take accusative "mich", not dative "mir"? Even though it is not "me" that I'm looking at?
How to supply water to a coastal desert town with no rain and no freshwater aquifers?
My professor has told me he will be the corresponding author. Will it hurt my future career?
Why did Super-VGA offer the 5:4 1280*1024 resolution?
Is there an upper limit on the number of cards a character can declare to draw from the Deck of Many Things?
Is conquering your neighbors to fight a greater enemy a valid strategy?
How do I talk to my wife about unrealistic expectations?
Does the Milky Way orbit around anything?
What is the meaning of "prairie-dog" in this sentence?
Why was no first prize awarded at a competition?
Will Jimmy fall off his platform?
What's the big deal about the Nazgûl losing their horses?
Chilling juice in copper vessel
Do Goblin tokens count as Goblins?
Why does this function pointer assignment work when assigned directly but not with the conditional operator?
Are "confidant" and "confident" homophones?
Initializing variables in an "if" statement
How to play a D major chord lower than the open E major chord on guitar?
What is the fundamental difference between catching whales and hunting other animals?
Options for quick email reply to the effect of "I've just done it" or "I've taken care of it"
Slack bot open message with group
Slack: Retrieve all messagesHow to join a Slack channel as a Real Time Messaging bot user?slack bot respond to messages with a mentionCan a slack bot message another bot?Slack Bot Interactive MessagesHow can a Slack bot detect a direct message vs a message in a channel?Sending direct message to a bot in slack and get the responseSlack scopes and bot usersSlack bot permission to delete a message
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Currently I use the webhook method for my "bot" to send messages to team members.
This is great so far:
$curl = curl_init('https://hooks.slack.com/services/XXX/YYY/ZZZ');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($message));
$json_response = curl_exec($curl);
The messages are encoded as JSON as per https://api.slack.com/docs/message-attachments
We use this to send exception reports to individuals. Some exception reports require my project administrator to follow up. (An exception might be "you didn't fill in your calendar for next week.")
I believe it could improve accountability if rather than a robot sending messages directly to a team member, the robot could send the message to the team member and the project administrator.
For direct message we can use
'channel' => '@' . $row['responsible_person'],
but the obvious
'channel' => '@' . $row['responsible_person'] . ',@projectadmin',
does not work.
Is this possible?
slack-api
add a comment |
Currently I use the webhook method for my "bot" to send messages to team members.
This is great so far:
$curl = curl_init('https://hooks.slack.com/services/XXX/YYY/ZZZ');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($message));
$json_response = curl_exec($curl);
The messages are encoded as JSON as per https://api.slack.com/docs/message-attachments
We use this to send exception reports to individuals. Some exception reports require my project administrator to follow up. (An exception might be "you didn't fill in your calendar for next week.")
I believe it could improve accountability if rather than a robot sending messages directly to a team member, the robot could send the message to the team member and the project administrator.
For direct message we can use
'channel' => '@' . $row['responsible_person'],
but the obvious
'channel' => '@' . $row['responsible_person'] . ',@projectadmin',
does not work.
Is this possible?
slack-api
As far as I am aware, it is not possible to send a single message to two different users. A thought though -- what about sending the same message to the two different users independently?
– Obsidian Age
Mar 25 at 20:41
Yes, you can send messages to a group of people. Its called Group DM. See my answer below for details.
– Erik Kalkoken
Mar 25 at 23:37
add a comment |
Currently I use the webhook method for my "bot" to send messages to team members.
This is great so far:
$curl = curl_init('https://hooks.slack.com/services/XXX/YYY/ZZZ');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($message));
$json_response = curl_exec($curl);
The messages are encoded as JSON as per https://api.slack.com/docs/message-attachments
We use this to send exception reports to individuals. Some exception reports require my project administrator to follow up. (An exception might be "you didn't fill in your calendar for next week.")
I believe it could improve accountability if rather than a robot sending messages directly to a team member, the robot could send the message to the team member and the project administrator.
For direct message we can use
'channel' => '@' . $row['responsible_person'],
but the obvious
'channel' => '@' . $row['responsible_person'] . ',@projectadmin',
does not work.
Is this possible?
slack-api
Currently I use the webhook method for my "bot" to send messages to team members.
This is great so far:
$curl = curl_init('https://hooks.slack.com/services/XXX/YYY/ZZZ');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($message));
$json_response = curl_exec($curl);
The messages are encoded as JSON as per https://api.slack.com/docs/message-attachments
We use this to send exception reports to individuals. Some exception reports require my project administrator to follow up. (An exception might be "you didn't fill in your calendar for next week.")
I believe it could improve accountability if rather than a robot sending messages directly to a team member, the robot could send the message to the team member and the project administrator.
For direct message we can use
'channel' => '@' . $row['responsible_person'],
but the obvious
'channel' => '@' . $row['responsible_person'] . ',@projectadmin',
does not work.
Is this possible?
slack-api
slack-api
asked Mar 25 at 20:30
William EntrikenWilliam Entriken
21.2k12 gold badges95 silver badges148 bronze badges
21.2k12 gold badges95 silver badges148 bronze badges
As far as I am aware, it is not possible to send a single message to two different users. A thought though -- what about sending the same message to the two different users independently?
– Obsidian Age
Mar 25 at 20:41
Yes, you can send messages to a group of people. Its called Group DM. See my answer below for details.
– Erik Kalkoken
Mar 25 at 23:37
add a comment |
As far as I am aware, it is not possible to send a single message to two different users. A thought though -- what about sending the same message to the two different users independently?
– Obsidian Age
Mar 25 at 20:41
Yes, you can send messages to a group of people. Its called Group DM. See my answer below for details.
– Erik Kalkoken
Mar 25 at 23:37
As far as I am aware, it is not possible to send a single message to two different users. A thought though -- what about sending the same message to the two different users independently?
– Obsidian Age
Mar 25 at 20:41
As far as I am aware, it is not possible to send a single message to two different users. A thought though -- what about sending the same message to the two different users independently?
– Obsidian Age
Mar 25 at 20:41
Yes, you can send messages to a group of people. Its called Group DM. See my answer below for details.
– Erik Kalkoken
Mar 25 at 23:37
Yes, you can send messages to a group of people. Its called Group DM. See my answer below for details.
– Erik Kalkoken
Mar 25 at 23:37
add a comment |
1 Answer
1
active
oldest
votes
Yes, you can send a message to several users at once with Slack. Its calls "multi-person direct message" or Group DM or MPIM and here is how it works:
- Open the new MPIM channel with conversations.open and provide the user IDs with the
users
property. This will return the ID of the MPIM channel and also create the channel if needed. - Use the channel ID to post your messages as you would with any other channel.
Note that this channel will consist of the members you invited and your bot user.
See also here for an overview of all channel types in Slack.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345943%2fslack-bot-open-message-with-group%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, you can send a message to several users at once with Slack. Its calls "multi-person direct message" or Group DM or MPIM and here is how it works:
- Open the new MPIM channel with conversations.open and provide the user IDs with the
users
property. This will return the ID of the MPIM channel and also create the channel if needed. - Use the channel ID to post your messages as you would with any other channel.
Note that this channel will consist of the members you invited and your bot user.
See also here for an overview of all channel types in Slack.
add a comment |
Yes, you can send a message to several users at once with Slack. Its calls "multi-person direct message" or Group DM or MPIM and here is how it works:
- Open the new MPIM channel with conversations.open and provide the user IDs with the
users
property. This will return the ID of the MPIM channel and also create the channel if needed. - Use the channel ID to post your messages as you would with any other channel.
Note that this channel will consist of the members you invited and your bot user.
See also here for an overview of all channel types in Slack.
add a comment |
Yes, you can send a message to several users at once with Slack. Its calls "multi-person direct message" or Group DM or MPIM and here is how it works:
- Open the new MPIM channel with conversations.open and provide the user IDs with the
users
property. This will return the ID of the MPIM channel and also create the channel if needed. - Use the channel ID to post your messages as you would with any other channel.
Note that this channel will consist of the members you invited and your bot user.
See also here for an overview of all channel types in Slack.
Yes, you can send a message to several users at once with Slack. Its calls "multi-person direct message" or Group DM or MPIM and here is how it works:
- Open the new MPIM channel with conversations.open and provide the user IDs with the
users
property. This will return the ID of the MPIM channel and also create the channel if needed. - Use the channel ID to post your messages as you would with any other channel.
Note that this channel will consist of the members you invited and your bot user.
See also here for an overview of all channel types in Slack.
answered Mar 25 at 23:36
Erik KalkokenErik Kalkoken
15.6k3 gold badges29 silver badges54 bronze badges
15.6k3 gold badges29 silver badges54 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345943%2fslack-bot-open-message-with-group%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
As far as I am aware, it is not possible to send a single message to two different users. A thought though -- what about sending the same message to the two different users independently?
– Obsidian Age
Mar 25 at 20:41
Yes, you can send messages to a group of people. Its called Group DM. See my answer below for details.
– Erik Kalkoken
Mar 25 at 23:37