Better Call Slack is a plugin that will monitor everything aspect of your WordPress site and notify you in the well known Slack application. Slack is a communication platform for teams and companies. You can Learn more about Slack and how you can use it here
To install the plugin simply navigate to Plugins > Add New in your WordPress dashboard and search for better call slack!
Next click the Install Now button and wait for the plugin to be installed. Once the plugin is installed you can click the Activate button.
That’s it. The plugin is installed and activated.
Setting Up Slack Incoming Webhooks
This section assumes you have already a Workspace in Slack. If you dont have please do, its free here.
Incoming Webhooks are a simple way to post messages from external sources including your WordPress installation into Slack. We will send a normal HTTP request with a JSON protocol with some simple notification message. You can also use Incoming Webhooks to display rich format messages that include a link or even an emoji.
We will first set up an incoming webhook integration in your Slack workspace and then connect it with Better Call Slack plugin. In general we will be
- Sending messages
- Adding links
- Use advanced formatting
First navigate here https://my.slack.com/services/new/incoming-webhook/
You can also change in the same page the Integration Settings of the WebHook to your preference.
- You can select in Slack channel that you want your notifications to appear.
- You can get the WebHook URL or regenerate it.
- You can use a Description label for your web hook.
- You can customize the bot (user) the the messages will attach to.
- Upload a custom image of emoji for your notification bot.
Setting Up General Plugin Settings
If you want to add/edit your Global Plugin Settings navigate to SettingsBetter Call Slack. There you will get the following screen
Here you can
- Add your default Webhook URL.
- Add your bot name.
- Add an Emoji for your bot. This must be wrapped in colons ( : ) to work.
Creating a new Notification.
First navigate to Slack NotificationsAdd New Notification.
Then you will get a screen like this
Here you can
- Add a title for your Notification
- Change the Notification Settings / Triggers
- Publish your notification
Here you will need to add the basic settings for your Slack notifications
- Add your Web Hook URL
- Add the Channel you wish to notify
- Add your bot name
- Add your bot emoji (always in between colons : to work)
- Change the priority of your notification . This will change the color and style of your message. For example
When creating a new Notification you will need to setup the triggers as well. We have provided a variety of trigger sets and we will update them regularly to cover all possible scenarios in a WordPress installation.
Here you can:
- Send a notification when a new WordPress update is available. When checked you will get this Screen
Here you can customize the message and use the :core_version: tag to specify the version of the update
- Triggers when a User is registered / removed / or changed its role.
Again you can change the default message and include the :username: tag to include the new username. Some extra tags can be used like :old_role: and :new_role: when a user roles is changed.
- Triggers when a new theme is installed or when the theme has an update available. When an option is checked you will get this Screen
Here you can change the custom description and include the :theme_name: tag that was updated or installed. You can use global tags also like :current_user:
- Sends a notification when a status of a post / custom post type has changed. When an option is checked you will get this Screen
Here you can change the message when a new post is altered / published. You can use the :post_type: tag to specify the post type (product, menu item etc), the :title: of your post and the status tags :old_status: and :new_status: to send the status changed. You can include the :current_user: tag to actually send the name of the user that made this change.
- Triggers when a new comment is submitted or when a comment is approved or not. Checking this option will allow you to change the notification to your preference.
You can change the message using :post_type: and :title: tags to send information on which post the comment was added.
Exclude Posts and Custom Post types
In this section you can exclude a post type you dont want to trigger any of the notification settings.
Global Placeholders and Emoji
Using placeholders in several occasions will help you send with data that are valuable for your team to actually understand the notification. We provided some generic / global placeholder you can use in any text notification. These are
- :site_url: – Your site URL
- :site_name: – Your site Name
- :current_user: – The current user that triggered the notification
You can send also emojis with your message notifications! These emojis must be be wrapped like Global Placeholders in colons like this :unicorn_face: