-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discord Webhook Messages #591
Comments
That's because discord expects message text under "content" property, while cronicle uses "text" property (would work with slack and many other messengers). e.g. curl -H "Content-Type: application/json" -d '{"content": "hello"}' $WEBHOOK_URL I don't think you can configure that, although you may do a little tweak in lib/job.js file Line 1404 in a093f6b
then on the next line add something like hook_data.content = hook_data.text
|
Thank you, that works for now. I'll see if I can make it a bit more beautiful with embeds, but that's already great. Is there a reason why webhooks don't have two, one for success and one for failure? |
Thank you for that, @mikeTWC1984. If I add that line into the base code, would it break Slack or others? Hmmm... maybe it should be a configurable property name instead. In Cronicle v2, the web hooks are much more configurable, including assigning them as actions to job complete, job failure, other error codes, etc. |
Adding |
Released v0.9.21 with a fix for this. Thanks again, @mikeTWC1984! |
Hey @jhuckaby
|
@Skyfay See Wiki here: https://github.com/jhuckaby/Cronicle/wiki/Discord-Webhook-Integration I believe it answers both of your questions. |
@jhuckaby Thanks.
How could I now integrate this into the config, can you give me an example? |
I'm sorry, there's no way to do that with Cronicle. You can only customize the text for the notification. Apologies, but there's also no way to customize the webhook URLs per outcome. However, this feature will be coming in Cronicle v2 (will release sometime in 2023). |
Summary
I am trying to send a report to Discord via Webhoock after a job. However, it does not work. Is that even possible?
Steps to reproduce the problem
I created a Webhook link in Discord and then entered it in the software under "Web Hook" under "E-mail".
The text was updated successfully, but these errors were encountered: