The Slack chat tool by default sends email notifications saying "You were mentioned ..." when in fact it was @channel and not you. The only way I can find to turn these off is to go into each channel setting.
Open the channel that you want to mute. Click on the channel name in the conversation header. Below the channel name, click on the notifications menu. Select Mute channel.
Open a channel or group DM. Click the channel or member names in the conversation header. Below the conversation name, click the notifications drop-down menu. Choose your notification preference.
From your desktop, click your profile picture in the top right. Select Preferences from the menu to open your notification preferences. Scroll down to Sound & appearance. If you'd like, check the box next to Include a preview of the message in each notification or Mute all sounds from Slack.
Configure conversation-specific notificationsClick on the channel or member names in the conversation header. Below the conversation name, click on the notifications drop-down menu. Choose your notification preference. Click on the close icon in the top right when you've finished.
I was looking for the same and I saw that nobody answered, so this is what I've found: you cannot and you won't ever be able to.
@channel: everybody in a channel, it's a kind of contract with the user and everybody inside a channel should receive a notification.
The point is that Slack has a netiquette, and users would have to know it. Alternatives to @channel keyword are @everyone and @here, the first one working only in "big" channels, the second one only for people currently active. You can disable notifications for these keywords.
https://get.slack.help/hc/en-us/articles/202009646-Make-an-announcement
I've had this same problem for a while and manually tweaking prefs is too time-consuming. I've written a script to automate it for me.
For a more in-depth explanation, please visit my blog post:
https://mobeigi.com/blog/programming/disable-slack-channel-and-here-notification-for-all-channels/
Otherwise, the full solution ahead.
First download this script:
https://gist.github.com/mobeigi/8e5372f1e14e2a302e186d1753f9a649
Or copy and paste it from here:
// Slack User Notification Preference Bulk Update // By Mo Beigi const slackTeamId = "EXAMPLE17"; const localConfigJson = JSON.parse(localStorage.localConfig_v2); const slackUrl = localConfigJson.teams[slackTeamId].url; let channel_ids = []; // client.boot contains list of channel ids user is subscribed to amongst other things await fetch(slackUrl + "api/client.boot?" + "_x_id=noversion-1598950616.732" + "&_x_version_ts=noversion" + "&_x_gantry=true", { method: 'post', credentials: 'include', headers: { "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" }, body: "token=" + localConfigJson.teams[slackTeamId].token + "&only_self_subteams=1" + "&flannel_api_ver=4" + "&include_min_version_bump_check=1" + "&version_ts=1598934919" + "&_x_reason=deferred-data" + "&_x_sonic=true", }, ) .then(result => result.json()) .then(result => channel_ids = result.channels); // iterate channel id list and set notification prefs asynchronously let fetchPromises = []; for (i = 0; i < channel_ids.length; ++i) { console.log("Setting user notification prefs for channel id: " + channel_ids[i].id + " ..."); fetchPromises.push( fetch(slackUrl + "api/users.prefs.setNotifications?" + "_x_id=c189c956-1598949859.880" + "&_x_csid=7dP2GCgBJsY" + "&slack_route=" + localConfigJson.teams[slackTeamId].enterprise_id + ":" + slackTeamId + "&_x_version_ts=1598934919" + "&_x_gantry=true", { method: 'post', credentials: 'include', headers: { "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" }, body: "name=suppress_at_channel" + "&value=true" + "&channel_id=" + channel_ids[i].id + "&global=false" + "&sync=false" + "&token=" + localConfigJson.teams[slackTeamId].token + "&_x_reason=prefs-store/setChannelNotificationOverride" + "&_x_mode=online" + "&_x_sonic=true" } ) .then(result => result.json()) .then(console.log("Done (" + channel_ids[i].id + ")")) ); // Generous delay to get around rate limit await new Promise(r => setTimeout(r, 250)); } Promise.all(fetchPromises).then(function() { console.log("Successfully set user notification prefs for " + channel_ids.length + " channels."); });
JSON.parse(localStorage.localConfig_v2).teams
slackTeamId
in the Javascript script with your id from Step 4.You should now have turned every channels @channel and @here notification preference off.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With