Slack Notifications

Send notifications to Slack when someone places an order, a entry is created, or something else happens

Installation #

To install Slack Notifications, follow these steps:

  1. Download & unzip the file and place the slacknotifications directory into your craft/plugins directory
  2. Install plugin in the Craft Control Panel under Settings > Plugins
  3. The plugin folder should be named slacknotifications for Craft to see it.

Slack Notifications works on Craft 2.4.x and Craft 2.5.x.

Configuring Slack Notifications #

First, setup a Incoming Webhook.

Then, copy the example config file slacknotifications.php into your config directory, usually craft/config.

Then, modify your config and add your events.

return [
    // Webhook URL - get it by creating a incoming webhook 
    // at
    'webhook'        => '',

    // Enable notifications for entries that is disabled
    'notifyDisabled' => false,

    // Username
    'username'       => 'Craft',

    // Custom emoji for your webhook
    'emoji'          => ':monkey_face:',

    // Notifications, defined by event name => template (relative to your site templates path)
    // Your custom events will get any params passed to them.
    'notifications'  => [
        // By default, sections and charge.onCharge is built in
        // 'sections' => [
        // 'sectionHandle' => '_slack/my-section'
        // ],
        // 'charge'   => '_slack/charge'
        // Add any other, eg Commerce events
        // 'commerce_orders.onOrderComplete' => '_slack/commerce-order'

Sending a message from templates #

You can also send messages from a template:

{{ craft.slackNotifications.send('Message from Craft') }}


1.0.0 — 2017-05-11 Download
  • Added: Initial release

Currently available for Craft consulting and custom plugin development

Contact me