January 19, 20197 yr 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!
January 26, 20197 yr Author 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, 20197 yr by ctrlaltd1337
May 4, 20197 yr 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.
March 19, 20206 yr 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.
March 21, 20206 yr The test works for me, but i also have Telegram enabled, and now i only get Telegram messages.
March 23, 20206 yr 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.
March 26, 20206 yr 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.
April 3, 20206 yr 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, 20206 yr by ygrichman
April 16, 20206 yr 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
April 16, 20206 yr @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.
June 18, 20206 yr @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!
June 18, 20206 yr 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?
June 18, 20206 yr @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!
July 31, 20205 yr @Log1x This is great! Thanks for sharing. I am getting 2 of every notification though. Any ideas as to why? Edited July 31, 20205 yr by danktankk
March 17, 20215 yr 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/
Archived
This topic is now archived and is closed to further replies.