Receive SMS messages at your Twilio number in Slack and reply to them from Slack. Built with Node.js and deploy immediately to Heroku.
Text messaging has considerably higher yield than email. It is direct and a fast way to reach people. Using your Twilio number to communicate with friends, clients, customers, etc. through Slack makes this seamless. You can quickly receive inquiries and reply to them.
Incoming messages look pretty!
Reply using quick /twilio command!
- slackSMS requires some setup (auth tokens and the like) but then can be configured easily and deployed very fast on Heroku or others
-
If you're interested in customizing slackSMS, just clone the repo:
$ git clone https://github.com/ammaristotle/slackSMS $ npm install
-
You'll then have to complete steps 1-4 below and copy the configuration variables to a
.env
file (using.env.example
as a guide). Then:$ npm start # runs the server on port 4000
- (Optional) Learn how to customize the way messages appear in Slack
-
Purchase a number from Twilio if you haven't already
-
Retrieve your
accountSid
andauth token
for Twilio here -
Get an auth token from Slack. Get one quickly here
-
Set up an incoming webhook in Slack. Click "Add Configuration". Choose any channel, we will customize it later. Click "Add Incoming WebHooks Integration". Copy the Webhook URL. You'll need this to set up the slash command.
-
Now we'll link our Slack webhook to a slash command. Set up a new slash command. Then click "Add Configuration". You can make the command name anything you like. Make sure to replace
your-heroku-url
with your app's URL and the endpointapi/slack
as a POST request -
Go to your managed numbers console and click the number you just purchased. Make sure to replace
your-heroku-url
with your app's URL and the endpointapi/twilio
as a POST request -
Start sending messages!
The app is located on Docker's registry as ammaristotle/slacksms
It's ready to run using the supplied Dockerfile
standalone. Depending on your host, you'll have additional setup on your domain, so make sure to use that instead of the heroku url. The endpoints are still the same. For local builds (assuming you've done steps 1-4 below and created a .env
based off of .env.example
):
$ docker build -t slacksms .
$ docker run -p 4000:80 slacksms
This app is also ready for a compose workflow. See a sample here.
The underlying code for slackSMS is free and open source. However, Twilio charges
Contributions are welcome. Please raise issues as they arise.