Webhooks for new topic/reply notification
-
@julian said:
PI? It's possible, just hasn't been done yet... just one of many things I'd like to do with NodeBB
I have a community chatting on slack (http://www.slack.com), it will be interesting if I can use web hooks to integrate both system together.
-
Sure this is totally possible in a few lines of code.
Look here for full list of hooks: https://docs.nodebb.org/en/latest/plugins/hooks.html
Look for the hooks
action:post.save
andaction:topic.save
, in your plugin use the request module to make an API call to whatever API you want, in this case the Slack API with your creds.EDIT: If you make a plugin out of this, don't forget to release it Slack looks really cool.
-
I just posted a plugin to do just that: nodebb-plugin-slack
Available from npm or direct https://github.com/nhitchins/nodebb-plugin-slack -
@nhitchins said:
I just posted a plugin to do just that: nodebb-plugin-slack
Available from npm or direct https://github.com/nhitchins/nodebb-plugin-slackI saw this on Google! It sounds awesome
Did you post it in the plugins forum?
-
nodebb-plugin-slack installed in NodeBB v0.6.0. after activation we need to reload the NodeBB. Facing Error while reloading the NodeBB.
Error Message :
22/1 11:20 [21130] - error: TypeError: Cannot read property 'buildHeader' of undefined
at Object.Slack.init [as method] (/home/ubuntu/Nodebb/nodebb/NodeBB/NodeBB-NodeBB-2a92c11/node_modules/nodebb-plugin-slack/library.js:40:57)Kindly help us to fix this issue.
-
@nhitchins I have installed the npm module (nodebb-plugin-slack). I'm using NodeBB v0.6.0.
Once module is installed and activated, tried to reload the NodeBB. We are facing error while reloading the nodebb.Error Message -
Error Message :22/1 11:20 [21130] - error: TypeError: Cannot read property 'buildHeader' of undefined
at Object.Slack.init [as method] (/home/ubuntu/Nodebb/nodebb/NodeBB/NodeBB-NodeBB-2a92c11/node_modules/nodebb-plugin-slack/library.js:40:57)Kindly help us to fix this issue.
-
-
@Prasanna-Prachu yes, that will remove it so you can use your page until the 0.6.0 version is ready.
-
@Prasanna-Prachu I am not sure when this plugin will be updated but you can modify the library.js file of the plugin a little bit to make the plugin work.
Replace lines 35 - 41 from library.js with these
Slack.init = function(app, callback) { function render(req, res, next) { res.render('admin/plugins/slack', {}); } app.router.get('/admin/plugins/slack', app.middleware.admin.buildHeader, render); app.router.get('/api/admin/plugins/slack', render);
-
@Prasanna-Prachu plugin is now updated to work with v0.6.0
-
@pichalite Slack module is installed. Kindly guide me how to configure the Slack into NodeBB. Im using mailgun for sending mail. How to integrate mailgun and slack so that email need to trigger any new direct messages or mentions of your name.
-
This post is deleted!
-
This post is deleted!
-
@Prasanna-Prachu said:
I installed nodebb-plugin-slack module for email integration. Created a account in slack .
Kindly guide me how to configure slack module into NodeBB for new topic/reply email notification.