This node.js example connector allows you to make your Teneo bot available via Nexmo WhatsApp. The connector acts as middleware between Nexmo and Teneo and WhatsApp text communication with a Teneo bot, persisting state, conversational position etc.
This connector works with the current Nexmo Sandbox.
Nexmo API requires that the connector is available via https. Ngrok is recommended for this.
ngrok http 1337
Webhook URLfor the following steps.
In your sandbox you will need to application and click "Action". Set the "Answer URL" to your ngrok HTTPS endpoint above
You will also require your JSON Web Token (JWT)
git clone https://github.com/pomegran/nexmo-whatsapp-teneo.git
NEXMO_JWT=<Your_JSON_Web_Token> NEXMO_MESSAGE_URL=<Endpoint_for_sending_messages> TENEO_ENGINE_URL=<your_engine_url> PORT=<Port_to_run_this_application_on> node server.js
WhatsApp message your Nexmo number and speak to your bot!
Click the button below to deploy the connector to Heroku:
In the 'Config Vars' section, add the following: