ClientConnect is a platform for connecting with potential incoming clients. [Need to write more copy]
- Ruby 2.2.3
- Rails 5.0.0.rc1
- Create Twilio Number and TwiML App.
- Create Slack Bot
- Set Up App Locally
- Add URLs to TwiML App
- Check Out the App!
- For this app to work, you will need to purchase a new Twilio Programmable Voice and SMS number.
- Add the following environment variables from your Twilio account to your
application.yml
file:
TWILIO_ACCOUNT_SID: your account sid
TWILIO_AUTH_TOKEN: your auth token
TWILIO_PHONE_NUMBER: your twilio phone number
- Create a new TwiML App. We will configure the Voice and Messaging request URLs after our app has been set up locally.
- Add the following environment variables to your
application.yml
file:
TWIML_APPLICATION_SID: your twiml app sid
Slack Custom Integration > Bots
- Create a new Slack Bot. Give it any name you'd like, such as
@client-connect-bot
. - Invite the bot to the Slack channel that you'd like your incoming leads to post to (or create a new channel).
```
/invite @YOUR-BOT-NAME
```
- Add the following environment variables to your
application.yml
file:
```
SLACK_API_TOKEN: your slack bot API token
SLACK_CHANNEL: slack channel that bot messages will post to
```
![Slack screenshot](app/assets/images/slack.png)
-
Install dependencies
bundle install
-
Create database, run migrations, seed database (if desired):
rake db:create db:migrate db:seed
-
Make sure tests pass:
```
bundle exec rspec
```
-
Run the server:
rails s
-
We will need to make the server of this app publicly accessible, using ngrok. Once you have installed ngrok, run:
ngrok http 3000
- Once you have started ngrok, update the TwiML App's Voice and Messaging Request URLs to use your ngrok hostname:
VOICE: http://YOUR-NGROK-HOSTNAME.ngrok.io/call/connect MESSAGING: http://YOUR-NGROK-HOSTNAME.ngrok.io/text/connect
![TwiML Screenshot](app/assets/images/twiml-urls.png)
The app is now ready to accept incoming calls and texts!
http://localhost:3000