Slack is a team collaboration tool that offers chat rooms organized by topic, as well as private groups and direct messaging. It’s a great way to be productive with your team without clogging up your inbox.
Slackbot is Slack’s built-in robot, which helps us send messages to you and your team inside your Slack account.
Because it can help you manage your websites, and stay on top of changes, by sending notifications (following numerous WordPress events) to your Slackbot who will pass them along to a channel or direct message in your Slack account.
Rock the Slackbot is multisite-friendly.
Rock the Slackbot sends customizable notifications for the following events:
I’m working to add the following events:
Each event can be customized to allow you to send different event notifications to different Slack channels, e.g. you can send core, theme and plugin updates to your “wp-development” channel while all of your post changes go to your “wp-content” channel.
Please use the Issues section of this plugin’s GitHub repo to suggest features, like other notification events.
A Slack account is required to use this plugin and is free to use for as long as you want and with an unlimited number of people. Visit the Slack website to learn more and sign up.
You can use the following send_webhook_message() function to send a simple message to your Slack account.
The function accepts the following parameters:
$channel – OPTIONAL – the channel you want to send message to. Prefix with # for a specific channel or @ for a specific user. Will use default channel if nothing is passed.
// Use this function to send a simple message to Slack
rock_the_slackbot()->send_webhook_message( ‘564d3c1cdf52d’, ‘this is a test’, ‘#testchannel’ );
Rock The Slackbot has filters setup to allow you to tweak each WordPress notification before it’s sent. You can setup a filter for all notifications or drill down by event or specific webhook.
Each notification filter passes three arguments:
See Notification Events below to learn which information is passed to the filters for each notification event.
add_filter( 'rock_the_slackbot_notification', 'filter_rock_the_slackbot_notification', 10, 3 ); function filter_rock_the_slackbot_notification( $notification, $notification_event, $event_args ) { // Change the pieces // Return the notification return $notification; }
// You can find the ID for each of your webhooks on their edit screen in the admin add_filter( 'rock_the_slackbot_notification_(webhook_id)', 'filter_rock_the_slackbot_notification_webhook', 10, 3 ); function filter_rock_the_slackbot_notification_webhook( $notification, $notification_event, $event_args ) { // Change the pieces // Return the notification return $notification; }
// The event slugs are listed below add_filter( 'rock_the_slackbot_notification_(notification_event)', 'filter_rock_the_slackbot_notification_event', 10, 3 ); function filter_rock_the_slackbot_notification_event( $notification, $notification_event, $event_args ) { // Change the pieces // Return the notification return $notification; }
Whether it’s a WordPress notification or a simple Slack message, all messages to Slack are sent as a payload in an outgoing webhook. This filter allows you to change any payload sent to Slack in an outgoing webhook.
add_filter( 'rock_the_slackbot_outgoing_webhook_payload', 'filter_rock_the_slackbot_outgoing_webhook_payload', 10, 2 ); function filter_rock_the_slackbot_outgoing_webhook_payload( $payload, $webhook_url ) { // Change the payload // Return the payload return $notification; }<h3>Notification Events</h3>
Including event specific information passed to filters for each notification event.
You can use a filter to change the Slack notification to go to a different Slack channel according to post information, like the post category:
add_filter( 'rock_the_slackbot_notification', 'filter_rock_the_slackbot_notification', 10, 3 ); function filter_rock_the_slackbot_notification( $notification, $notification_event, $event_args ) { // Only run filter for specific events switch ( $notification_event ) { // This way you can set which events you want to use case 'post_published': case 'post_unpublished': case 'post_updated': case 'post_deleted': case 'post_trashed': // Get category names $categories = wp_get_post_categories( $event_args[ 'post_id' ], array( 'fields' => 'names' ) ); // Replace 'CategoryName' with the category you're looking for if ( in_array( 'CategoryName', $categories ) ) { // Change the channel in the payload // Make sure you prefix the channel name with # $notification[ 'payload' ][ 'channel' ] = '#newchannel'; } break; } // Return the notification return $notification; }
Starting from $0 per month.
Rating
Reviewers
15 reviews
Tags
Developed By
Rachel Cherry
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Keep Users Up to Date & Improve Their Experience
Comply With Legal Age Requirements & Protect Your Business
Use WhatsApp Chat To Communicate, Support & Improve User Experience
Improve User Experience & Collect Leads
Create Stunning Mastodon Feeds & Improve User Experience
Create Advanced online Brackets & Tournaments With Images, Voting and Predictions
Organize and Enhance Content with Customizable Collapsible Sections
Track and Display Real-Time Visitor Counts Easily
Improve visibility & Increase attendance with the Events List Widget
Increase Engagements & Social Media Presence With the Feeds Widget
Showcase Trusted Reviews Easily Across All Platforms
Streamline Your Scheduling Effortlessly with Our Booking Widget
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!