platform icon indicating copy to clipboard operation
platform copied to clipboard

Send a notification to discord using webhooks

Open wrtfix opened this issue 1 year ago • 8 comments

Description of the issue

A user wants to receive webhook notifications whenever there are updates to a task they are subscribed to.

Steps to reproduce

  1. The user creates a new task in the task board.
  2. The user enters the webhook URL in the designated field for notifications.
  3. The user adds other users as subscribers to the task.
  4. An update is made to the task (for example, change of status, assignment to a new user, attach a file).

Expected behaviour

  • A webhook notification is sent to the URL specified by the task creator user.
  • The notification should include relevant information about the task update, such as the task name, the change made, the user who made the change, and the date/time of the update.

Actual behaviour

Currently, the task board application does not have functionality to send webhook notifications. Task updates are only reflected in the application's user interface.

Possible solutions

  • Develop a new plugin that integrates with the existing task board functionality.
  • The plugin should allow users to:
  • Configure the webhook URL for each individual task.
  • Select the task events that will trigger a webhook notification (for example, status change, user assignment, etc.).
  • The plugin should use the Huly HTTP library to send JSON notifications to the specified webhook URL.
  • The JSON notification should contain relevant information about the task update.

wrtfix avatar Apr 18 '24 15:04 wrtfix

@wrtfix I'd be happy to work on this issue if it's still open!

Mohamed-khattab avatar Apr 22 '24 11:04 Mohamed-khattab

Hi @Mohamed-khattab, I did it for a challenge. I don't know if it is okay for you @aplatoff. Best regards!

wrtfix avatar Apr 22 '24 12:04 wrtfix

Hello @wrtfix. I appreciate your suggestion. Could you please clarify why having different callback URLs for issues is necessary? In situations where teams handle tens of thousands of issues, managing them can become quite challenging, and having distinct callback URLs might exacerbate the complexity. Could you share your insights on this matter?

BykhovDenis avatar Apr 22 '24 13:04 BykhovDenis

Hi @BykhovDenis because you can use URL for Discord webhook now but if you want to do something like that for Teams app for example you can reuse this piece of code only for this reason.

wrtfix avatar Apr 22 '24 14:04 wrtfix

I disagree only with this line Configure the webhook URL for each individual task.. For my opinion it appears more efficient to centralize notifications through a single endpoint or, alternatively, to designate one per project. I'm curious about the reasoning behind requiring distinct callback URLs for different tasks and would like to understand the rationale behind it.

BykhovDenis avatar Apr 22 '24 15:04 BykhovDenis

yes that its a good point... but sometimes you only need monitoring a particular task and maybe would you like to send the behaviors in the particular group so for this reason I defined this ticket with this kind of possibility. But it's only my point of view.

wrtfix avatar Apr 22 '24 15:04 wrtfix

I would want this feature so badly, but maybe we could simply go with a single Discord webhook URL to capture all traffics on the board instead for simplicity?

ervandev avatar Jun 30 '24 03:06 ervandev