Slack Integration module

Edition

Incubator (services)

Issues

Git

Git

Latest

1.2

Compatible with Magnolia 6.2.27.

The Slack Integration module provides different connection points to Slack.

This module is at the INCUBATOR level.

Installing with Maven

Maven is the easiest way to install the module. Add the following to your bundle:

<dependency>
  <groupId>info.magnolia.slack</groupId>
  <artifactId>magnolia-slack-integration</artifactId>
  <version>1.2</version>
</dependency>

Usage

To configure the Slack connections, you will need to create the following file /decorations/slack-integration/config.yaml in a Magnolia (light) module.

To send a message on a Slack channel, you need to configure an incoming webhook as described here. You can then define different channel connections as following:
config.yaml
connections:
  channel1:
    url: https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYYYY/ajaskasnsjsajsasjasnasia
  channel2:
    url: https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYYYY/wqkwqnwqiqnwqiwqwmlqwqmw
  channel3:
    url: https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYYYY/owqwqwqwqowqwokqwqowkqow

Integration

Node publication notification

In a Magnolia module, create the following file /hooks/slack-node-publish.yaml.

The name slack-node-publish.yaml is for example purposes. It can be different.

The command sendNodeToChannel sends generic information about the node which has been published.

slack-node-publish.yaml
class: info.magnolia.slack.webhook.SlackWebhookDefinition
description: Post a message on any configuration change
connectionName: channel1
catalog: slack
commandName: sendNodeToChannel
trigger:
  workspace: config
  actions:
    - PUBLISH

Dam asset publication notification

In a Magnolia module, create the following file /hooks/slack-asset-publish.yaml.

The name slack-asset-publish.yaml is for example purposes. It can be different.

In order to display the asset node specific attributes, use the command sendAssetToChannel as following:

slack-asset-publish.yaml
class: info.magnolia.slack.webhook.SlackWebhookDefinition
description: Post a message on DAM asset publication
connectionName: channel2
catalog: slack
commandName: sendAssetToChannel
trigger:
  nodeType: mgnl:asset
  actions:
    - PUBLISH

Page publication notification

In a Magnolia module, create the following file /hooks/slack-page-publish.yaml.

The name slack-page-publish.yaml is for example purposes. It can be different.

In order to display the page node specific attributes, use the command sendPageToChannel as following:

slack-page-publish.yaml
class: info.magnolia.slack.webhook.SlackWebhookDefinition
description: Post a message on page publication
connectionName: channel2
catalog: slack
commandName: sendPageToChannel
trigger:
  nodeType: mgnl:page
  actions:
    - PUBLISH
Publication request notification

In a Magnolia module, create the following file /hooks/slack-page-request-publish.yaml.

The name slack-page-request-publish.yaml is for example purposes. It can be different.

In order to display the publication request attributes, use the command sendPublicationTaskToChannel as following:

slack-page-request-publish.yaml
class: info.magnolia.slack.webhook.SlackWebhookDefinition
description: Post a publication workflow task to Slack
connectionName: channel3
catalog: slack
commandName: sendPublicationTaskToChannel
trigger:
  nodeType: mgnl:page
  actions:
    - SUBMIT_PUBLISH

Changelog

Version Notes

1.1

Fixed multi-threading issue.

1.0

Initial release of the module.

Feedback

Incubators

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Slack Integration module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules