• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on Slack and Taiga Integration?

Daphonic

Active member
#1
I'm curious if someone could write an Add On, that will allow Taiga Chat to send it's messages to our Slack Chat Room, and Slack's Chat Room to Taiga's Chat? So that the Slack users and the Website Users can Cross Communicate? Would this be Possible? I read on their Site they got a pretty nice API set up.

https://api.slack.com/

Would love to know if this is Possible, and how much it would cost to code?
 

Daniel Hood

Well-known member
#2
Slack's API is pretty friendly. I've done some integration with it for my work as we use it for our internal messaging. I don't have time at the moment to make an add-on for this. I do believe @Jake B. set something up for HexThemes/Audentio Design though so he could potentially do this.
 

Jake B.

Well-known member
#3
All we have is a ridiculously simple add-on that pushes a message to Slack when a thread is created at forums.themehouse.com which just uses the following:

PHP:
class Slack
{
    protected static $_webHookUrl;

    public static function setWebHookUrl($url)
    {
        self::$_webHookUrl = $url;
    }

    public static function sendMessage($message)
    {
        $data = "payload=" . json_encode(array(
                "text"          =>  $message,
            ));

        $ch = curl_init(self::$_webHookUrl);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $result = curl_exec($ch);
        curl_close($ch);

        return $result;
    }
}
We only pass data to slack using their webhooks, we don't do anything the other way around unfortunately
 

Daphonic

Active member
#4
All we have is a ridiculously simple add-on that pushes a message to Slack when a thread is created at forums.themehouse.com which just uses the following:

PHP:
class Slack
{
    protected static $_webHookUrl;

    public static function setWebHookUrl($url)
    {
        self::$_webHookUrl = $url;
    }

    public static function sendMessage($message)
    {
        $data = "payload=" . json_encode(array(
                "text"          =>  $message,
            ));

        $ch = curl_init(self::$_webHookUrl);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $result = curl_exec($ch);
        curl_close($ch);

        return $result;
    }
}
We only pass data to slack using their webhooks, we don't do anything the other way around unfortunately

That is still pretty kick ass for the Forum posts tho. Curious if there is a way to maybe do it the other way around as well. I will look into getting that hook working on slack tonight, I thank you for that.