Skip to content

Notificaties naar Slack #1497

Discussion options

You must be logged in to vote

In principe kom je denk ik op zoiets uit. Er vanuitgaande dat je niet de legacy variant gebruikt, maar deze: https://api.slack.com/messaging/webhooks

Waarbij ik deze URL uit hun voorbeeld gehardcode heb, daar kun je je eigen variant van maken:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

dsmr_plugins/modules/relay_notification_to_slack.py

Nieuw script in je installatie

import requests

from django.dispatch import receiver

from dsmr_notification.signals import notification_sent


@receiver(notification_sent)
def handle_notification_sent(sender, title, message, **kwargs):
    # See: https://api.slack.com/messaging/webhooks
    SLACK_HOOK = 'https://hooks.…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eppomania
Comment options

Answer selected by dennissiemensma
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1494 on October 11, 2021 21:33.