Support for Discord notifications?


Recommended Posts

I've tried using the webhook from the Slack portion of Notification Settings but I'm not getting any notifications on my Discord server.

Is there a way to get this working, or are there plans of it happening? The last mention of it I see is from this thread, but under the Management line it just says "webgui: webGui: use JSON for Slack notifications since it is preferred and may work better for 3rd party webhooks (e.g. Discord)."

Thanks for any info!
 

Link to comment

Alright, I found a way and I'll leave it here for those who have the same question in the future.

 

Slack

  1. Sign up for Slack and make a Workplace
  2. Add the Incoming WebHooks app (https://slack.com/apps/A0F7XDUAZ-incoming-webhooks?next_id=0) to a specific channel within your Slack Workspace
  3. Note down or keep the tab open that gives you the Webhook URL

 

Unraid

  1. Go to Settings > Notifications
  2. Enable the Slack agent, enter the webhook URL you created
  3. Set the rest of the options to what you’d like

 

Zapier

  1. Sign up for Zapier and begin to make a Zap that includes Slack and Discord:
  2. Trigger:
  3. Slack Trigger: New Message Posted to Channel
  4. Select Slack Account you created
  5. Choose the same channel you setup with the webhook above, and allow ‘Trigger for Bot Messages?’
  6. Do the message pull test to confirm it worked
  7. Action:
  8. Discord Action: Send Channel Message
  9. Select Discord account you use for your server
  10. Choose the channel you would like notifications be sent to
  11. Click the button in the top right of the text box and select ‘New Message Posted to Channel’
  12. Set the rest of the options to what you’d like

 

I've had this working for some test messages and I'll update if I have any issues.

Edited by ctrlaltd1337
Link to comment
  • 3 months later...
  • 10 months later...
On 3/20/2020 at 8:53 AM, ygrichman said:

Does this method still work, as it only works for me if I select one thing to send (Timestamp, Description, etc..). When I select multiple the test doesn't send anything.

It is still working for me.  However I only send through the Subject and Description.
Attached is what I received this morning for my weekly notifications.

iOS Notification.jpg

Link to comment
  • 2 weeks later...

I've worked around the issue manually, I'll post it here in case anyone else has the same issue. 

Make sure the Slack notification service is enabled. Open the terminal and enter this:

cd /boot/config/plugins/dynamix/notifications/agents
sudo nano Slack.sh

Delete the script that is already there and replace it with the one below. Remember to add your Discord Webhook URL (don't add /slack to the end) and modify the message format if you want.

#!/bin/bash
############
#Insert Your Discord Webhook URL (Don't add /slack to the end)
WEBH_URL=""

#Enter Your Messaging Format (Look at Unraid GUI for the names of the available variables to use here)
#(Also Supports Markdown formatting such as the **BOLD** markup I use in below example)
MESSAGE="**$SUBJECT**\n$DESCRIPTION\n$CONTENT"
############
curl -k -X POST --header 'Content-Type: application/json' -d "{\"content\": \"$MESSAGE\"}" $WEBH_URL 2>&1

The default message format I've used in the script will look like this in Discord:

1826542209_UnraidDiscordNotificationExample.png.86e4a0d3f7c059deedab8cb074e77b65.png

 

From this point on do not edit the Slack settings in Unraid's GUI as it will most likely overwrite the modifications you've made. You can still use the Test button.

Hope this helps, feel free to ask if you need any help with this.

Edited by ygrichman
  • Like 1
Link to comment
  • 2 weeks later...
  • 2 months later...
3 minutes ago, coldwar7 said:

@Log1x I tried your card and it doesn't work with the slack test. Is this what you see as well? If so, do you know why? I love the idea and design but would like to test it out. Thanks!

It's working on my end. Did you mean to add a screenshot to your reply?

  • Thanks 1
Link to comment
  • 1 month later...
  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.