.. include:: ../../Includes.txt Slack notification ================== General configuration --------------------- The title can be an arbitrary label that will be used to identify the notification in the TYPO3 backend. A full description can also be added if needed. .. figure:: /Images/04-Notification/Slack/notification-slack-general.png :alt: Slack tab general Event ----- On this tab, an event must be selected among the ones available. .. note:: Some events might have a custom configuration. For instance, the event “TYPO3 > Scheduler task was executed” allows to select which specific task will fire the event. .. figure:: /Images/04-Notification/Slack/notification-slack-event.png :alt: Slack tab event Channel ------- .. note:: The current implementation will either use ``curl`` or ``Guzzle`` depending on the TYPO3 version of the system. .. figure:: /Images/04-Notification/Slack/notification-slack-channel.png :alt: Slack tab channel Message ------- The Slack message can be configured on this tab. .. hint:: This field can use markers that will be replaced by dynamic values before the message is sent. See chapter “:ref:`events-property-marker`” for more information. .. figure:: /Images/04-Notification/Slack/notification-slack-message.png :alt: Slack tab message Slack configuration ------------------- This tab contains Slack specific options. Bot ''' In this section, a bot must be selected. It can either be a defined bot or a custom one. Bots can be defined in the definition: .. code-block:: typoscript notiz { notifications { entitySlack { settings { bots { pizza { name = Mr Pizza avatar = :pizza: } } } } } } Slack channel ''''''''''''' In this section one or more channels can be selected. Channels can already be defined or be custom for a single notification only. Options """"""" Each channel is composed out of three options: =========== ==================================================================== label It will be displayed in the backend and can be an ``LLL:…`` reference. webhookUrl The Slack URL which the notification is sent to. It can be generated by following the `official documentation`_. target The ``@user``, ``MEMBER_ID`` or ``#slack-channel`` to send the notification to. =========== ==================================================================== .. _official documentation: https://api.slack.com/incoming-webhooks Definition """""""""" Channels are defined in the definition: .. code-block:: typoscript notiz { notifications { entitySlack { settings { channels { contact { label = Contact channel webhookUrl = https://hooks.slack.com/services/ABCDEFGHI/ABCDEFGHI/abcdefghijklmnopqrstuvw target = #contact } } } } } } .. figure:: /Images/04-Notification/Slack/notification-slack-configuration.png :alt: Slack tab slack The resulting message --------------------- Here is an example of what the generated message looks like: .. figure:: /Images/04-Notification/Slack/notification-slack-result.png :alt: Slack example