Skip to content

📲💬 A simple app to forward SMS messages from a Twilio number to a Slack channel

License

Notifications You must be signed in to change notification settings

asktrim/twilio-to-slack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twilio to Slack

A basic service that relays a Twilio SMS message to a Slack webhook.

Development

To run the app locally install Node and nodemon, then install all the dependencies:

npm install
SLACK_WEBHOOK_URL="https://hooks.slack.com/services/12345/123456/3456789034567" \
BOT_USERNAME="SMS Relay bot" \
PORT="8080" \
nodemon index.js

Testing the app can be done with a curl request:

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"Body": "Here you go 🌺", "From": "1-800-FLOWERS"}' \
  http://localhost:8080/sms

Ngrok can also be helpful for local development

Docker build and deploy

Build and push the image to Docker hub:

docker build -t bufferapp/twilio-to-slack:1.0.0 .
docker push bufferapp/twilio-to-slack:1.0.0 .

Test your container locally by running this command:

docker run -p 8080:8080 --env-file .env bufferapp/twilio-to-slack:1.0.0

License

MIT

About

📲💬 A simple app to forward SMS messages from a Twilio number to a Slack channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.0%
  • Dockerfile 16.0%