ctrlaltd1337 Posted January 19, 2019 Share Posted January 19, 2019 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! Quote Link to comment
ctrlaltd1337 Posted January 21, 2019 Author Share Posted January 21, 2019 Bumping this back to the first page. Quote Link to comment
ctrlaltd1337 Posted January 26, 2019 Author Share Posted January 26, 2019 (edited) Alright, I found a way and I'll leave it here for those who have the same question in the future. Slack Sign up for Slack and make a Workplace Add the Incoming WebHooks app (https://slack.com/apps/A0F7XDUAZ-incoming-webhooks?next_id=0) to a specific channel within your Slack Workspace Note down or keep the tab open that gives you the Webhook URL Unraid Go to Settings > Notifications Enable the Slack agent, enter the webhook URL you created Set the rest of the options to what you’d like Zapier Sign up for Zapier and begin to make a Zap that includes Slack and Discord: Trigger: Slack Trigger: New Message Posted to Channel Select Slack Account you created Choose the same channel you setup with the webhook above, and allow ‘Trigger for Bot Messages?’ Do the message pull test to confirm it worked Action: Discord Action: Send Channel Message Select Discord account you use for your server Choose the channel you would like notifications be sent to Click the button in the top right of the text box and select ‘New Message Posted to Channel’ 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 January 26, 2019 by ctrlaltd1337 Quote Link to comment
carl_nz Posted May 4, 2019 Share Posted May 4, 2019 Just setup my first server yesterday. It is possible to just use a Discord Webhook in the settings for Slack notifications. https://discordapp.com/developers/docs/resources/webhook#execute-slackcompatible-webhook Steps: 1. Get a normal Discord Webhook. 2. Append '/slack' to the end, and paste this into the Slack webhook settings. 2 Quote Link to comment
ygrichman Posted March 19, 2020 Share Posted March 19, 2020 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. Quote Link to comment
Tuumke Posted March 21, 2020 Share Posted March 21, 2020 The test works for me, but i also have Telegram enabled, and now i only get Telegram messages. Quote Link to comment
carl_nz Posted March 23, 2020 Share Posted March 23, 2020 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. Quote Link to comment
ygrichman Posted March 26, 2020 Share Posted March 26, 2020 I just tried switching to just subject and description but I still don't get anything apart from occasional messages that are just some asterisks. Weird Issue. Quote Link to comment
ygrichman Posted April 3, 2020 Share Posted April 3, 2020 (edited) 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: 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 April 3, 2020 by ygrichman 1 Quote Link to comment
Log1x Posted April 16, 2020 Share Posted April 16, 2020 On 4/3/2020 at 7:16 AM, ygrichman said: I've worked around the issue manually, I'll post it here in case anyone else has the same issue. Hey, thanks for this. I expanded on what you did and put it into an event card. Here it is if you want it: https://gist.github.com/Log1x/0c24e25952d039fa7e708d5205cd94f9 2 1 Quote Link to comment
ygrichman Posted April 16, 2020 Share Posted April 16, 2020 @Log1x Wow that looks a lot better, I saw the settings to do this in the API but decided not to push my luck, as I was happy just to get it working at all. Will definitely switch to this, thanks. 1 Quote Link to comment
coldwar7 Posted June 18, 2020 Share Posted June 18, 2020 @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! Quote Link to comment
Log1x Posted June 18, 2020 Share Posted June 18, 2020 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? 1 Quote Link to comment
coldwar7 Posted June 18, 2020 Share Posted June 18, 2020 @Log1x I did not think to add a screenshot but, with more effort, I found my issue. I was following the suggestion of adding "/slack" at the end of the webhook and that is apparently not needed in your script. Thank you for your quick response though! Quote Link to comment
danktankk Posted July 31, 2020 Share Posted July 31, 2020 (edited) @Log1x This is great! Thanks for sharing. I am getting 2 of every notification though. Any ideas as to why? Edited July 31, 2020 by danktankk Quote Link to comment
ljm42 Posted March 17, 2021 Share Posted March 17, 2021 Check out the Discord notification agent added to Unraid 6.9.0. Thanks @Log1x for showing me that card formatting was possible, I dove into it further using this site: https://birdie0.github.io/discord-webhooks-guide/ 1 Quote Link to comment
Recommended Posts
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.