Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
4.0k views
in Plugins by
So my goal is to take each question and answer that gets posted to our companies Q2A site and post that link to the quesiton or answer, and the persons name into slack. I have a slack client written in C# that will take the data from Q2A and post it into slack. I also have a plug in set up that will run whenever a question or answer gets posted using q_post, and a_post. The problem is this plug in wont run my SlackClient.exe which post the data to slack. I think this might be the VM's security. I also tried getting the plug in to talk to a web service I made to post to slack as well, but so far no luck. I've tried accessing the web service using Curl, and using nusoap's soapclient but it won't talk to the service. Has anybody seen/made a plug in that can either run a .exe file or send data to a web service? Or does anyone else have any ideas on how to accomplish this?

1 Answer

+3 votes
by

Have a look at this plugin.

by
When configuring that plugin, do you put in an inbound webhook as the $slackUrl? I can't seem to get mine to work.
by
Unfortunately I did not test that plugin yet, I just saw that it exists :-) For the moment I went to a much simpler solution : using Q2A's RSS feed as a Slack RSS integration. Not realtime but works pretty well. If I have some time to test the "real plugin" I'll post results/investigations here.
by
In case anyone is having trouble with that plugin, I had to add,

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

to qa-slack.php on my setup, otherwise curl_exec failed silently trying to post to the HTTPS Slack webhook (see http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/).
by
Hey, I'm the author of this plugin. I've added a note to the README about this, thanks for pointing it out (I didn't have the issue while doing my own testing)
...