Discord Webhooks

Hello. I am new to Taiga and member of a community that qualifies junior web developers through volunteer work with NGOs.

We have some teams and use discord to communicate since it is very flexible regarding servers. Our teams benefit a lot from webhooks sending notifications in specific channels from GitHub.

I tried to make the same connection with Taiga but it asks for a secret key and discord does not provide one for its webhooks. In this case…what step should i take?
I tried inputting a dummy value like 0 but as expected, no success.

This is regarding Taiga Cloud, by the way.

Hi Rafael. Third party services would need to understand how to consume the ‘payload’ from a Taiga webhook, even if they did use a ‘secret key’.

So because Discord probably doesn’t have anything built-in to understand the format of the payload that Taiga delivers, you probably can’t use the Taiga ‘webhooks’ feature for this.

See Discord Integration? - #6 by jinformatique

Instead the approach would require being in the other direction: writing a ‘plugin’ for Taiga that understands how to deliver data to a Discord webhook. There is an official Slack plugin for doing that in Slack, and I recently wrote one for Google Chat which began as a clone of the Slack one, just adjusted names and the payload format to be the way Google Chat wants it.

If you have the capability, maybe you can clone one of these repos and adjust it to make a Discord equivalent. (I know nothing about the Discord webhook format).

Hope that makes sense!

2 Likes

Yes it does! Thank you for your help!

I admit that was a bit silly of me, i just assumed webhooks worked out of the box since it did with GitHub, but i guess that’s the reason i have to append /github at the end of a Discord webhook URL. Tech isn’t magic :sweat_smile:

I noticed that after digging a bit further, the problem wasn’t the secret key because dummy values work with webhooks test websites. But Discord sends the response Cannot send an empty message

I might not have to do that work myself, i found this and checking the code in server.js it seems to have the appropriate format.

But as far as i understand, this (and your Google Chat plugin) can only be run in a self-hosted instance, correct?

That’s right, it would be for a self-hosted instance, not for the tree.taiga.io service.