Hi I created a chatbot and using node red to add this chatbot different features. I connected this chatbot to slack using webhooks. I am trying to do the same thing on wordpress, so far I read about how to do that but i dont know how to create the chatbot box on worpress and use the service, below you can see the code on PHP for my wordpres. if some one help me with this ill be fully greatful.
// make a function that loads before anything on wordpress loads
add_action('init','webhook_super_star');
// in the function look for a unique server related URI
// I personally like to check against a GET variable
function webhook_super_star() {
if( $_SERVER['REQUEST_URI'] == '/webhook' ||
$_SERVER['REQUEST_URI'] == '/webhook/') {
//Do some cool stuff
}
}
There is already a Wordpress plugin available that helps you to integrate Watson Assistant (previously Conversation) into your wordpress site - https://wordpress.org/plugins/conversation-watson/
Here’s an article to help you with step-by-step instructions - https://medium.com/ibm-watson/add-watson-assistant-to-your-wordpress-site-6f30d537b9e5