This setup assumes you have redis and ngrok installed. To boot this bot locally, use the following CLI commands:
bundle install
redis-server
ngrok http 5000
bundle exec stealth s
This runs a Redis server, the Stealth server and an ngrok tunnel to your system, allowing you to use web hooks (Twilio or otherwise) to trigger chatbot flows. The chatbot is currently set up to use Twilio, you can add a .env
file to your app root folder, with the following structure:
export TWILIO_ACCOUNT_SID=[Add info here]
export TWILIO_AUTH_TOKEN=[Add info here]
You can start a conversation by texting the number you have set up in Twilio. To do this,
- Start a new project with Programmable SMS
- Add a new number using your Trial credit
- Add this number to your
services.yml
file - Set up the ngrok tunnel forwarding path (e.g. https://1e6e7b84c8a8.ngrok.io) to your Twilio messaging service's setting page. It should look like this:
- Once that's all set up, you can send a text to your Twilio number to initiate a conversation with Botnik.
- Texting
restart
resets the session, as it otherwise remembers where you left off if you're texting from the same number
TBC
For more information, please check out the Stealth documentation.