Public | Automated Build

Last pushed: 5 months ago
Short Description
sms2slack
Full Description

slackSMS 💬


A client to interface between Twilio and Slack

Receive SMS messages at your Twilio number in Slack and reply to them from Slack. Built with Node.js and deploy immediately to Heroku.

Why does this matter? / Motivations

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.

Screenshots

Incoming messages look pretty!

Reply using quick /twilio command!

Requirements

  • slackSMS requires some setup (auth tokens and the like) but then can be configured easily and deployed very fast on Heroku or others

Custom configuration

  • 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
    

Get started (fast configuration)

  1. Purchase a number from Twilio if you haven't already

  2. Retrieve your accountSid and auth token for Twilio here

  3. Get an auth token from Slack. Get one quickly here

  4. 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.

  5. using the above credentials

  6. 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 endpoint api/slack as a POST request

  7. 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 endpoint api/twilio as a POST request

  8. Start sending messages!

Docker instructions

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.

Costs

The underlying code for slackSMS is free and open source. However, Twilio charges $.0075 to receive a message and $.0075 to send a message (about 1 cent each). Keep this in mind in case you plan on receiving 20 gazillion messages; that could cause a firestorm in your wallet.

Contributing / Issues

Contributions are welcome. Please raise issues as they arise.
~

Docker Pull Command
Owner
asimpson
Source Repository