All Projects → nishanths → slack-texts

nishanths / slack-texts

Licence: MIT License
SMS notifications for Slack groups

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to slack-texts

Gocd Slack Build Notifier
GoCD (gocd.org) plugin to push build notifications to Slack
Stars: ✭ 96 (+405.26%)
Mutual labels:  notifications, slack
Tfsnotificationrelay
An extensible plugin for TFS that sends notifications to Slack, HipChat and IRC
Stars: ✭ 120 (+531.58%)
Mutual labels:  notifications, slack
Ravenx
Notification dispatch library for Elixir applications
Stars: ✭ 100 (+426.32%)
Mutual labels:  notifications, slack
Potato Library
Easy to use Utility library for Android
Stars: ✭ 45 (+136.84%)
Mutual labels:  notifications, sms
Uptime Monitor App
A PHP application to monitor uptime and ssl certificates
Stars: ✭ 205 (+978.95%)
Mutual labels:  notifications, slack
Synology Notifications
Synology notifications service
Stars: ✭ 47 (+147.37%)
Mutual labels:  notifications, slack
Statusok
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Stars: ✭ 1,522 (+7910.53%)
Mutual labels:  notifications, slack
Laravel Failed Job Monitor
Get notified when a queued job fails
Stars: ✭ 582 (+2963.16%)
Mutual labels:  notifications, slack
Django Herald
A Django messaging library
Stars: ✭ 159 (+736.84%)
Mutual labels:  notifications, sms
Yfiton
Cross-platform CLI utility command for sending notifications using well-known or modern communication services
Stars: ✭ 142 (+647.37%)
Mutual labels:  notifications, slack
Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (+26.32%)
Mutual labels:  notifications, slack
Psslack
PowerShell module for simple Slack integration
Stars: ✭ 231 (+1115.79%)
Mutual labels:  notifications, slack
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+3726.32%)
Mutual labels:  notifications, slack
Craft Brief
Quick, easy, and customizable user-group notifications for Craft CMS.
Stars: ✭ 47 (+147.37%)
Mutual labels:  notifications, slack
Diun
Receive notifications when an image is updated on a Docker registry
Stars: ✭ 704 (+3605.26%)
Mutual labels:  notifications, slack
Django Notifs
Modular Notifications (InApp, Email, SMS, CustomBackend etc) for Django
Stars: ✭ 105 (+452.63%)
Mutual labels:  notifications, sms
Chronos
📊 📊 📊 Monitors the health and web traffic of servers, microservices, and containers with real-time data monitoring and receive automated notifications over Slack or email.
Stars: ✭ 347 (+1726.32%)
Mutual labels:  notifications, slack
Alertmanager
Prometheus Alertmanager
Stars: ✭ 4,574 (+23973.68%)
Mutual labels:  notifications, slack
Server Monitor App
A PHP application to monitor the health of your servers
Stars: ✭ 141 (+642.11%)
Mutual labels:  notifications, slack
Laravel Slack Slash Command
Make a Laravel app respond to a slash command from Slack
Stars: ✭ 215 (+1031.58%)
Mutual labels:  notifications, slack

slack-texts

NPM version License shield

Receive text messages for conversations on Slack channels using Twilio.

You can import it as a package (see below), or use it directly from the command-line.

Quick start

Install via npm:

$ npm install --save slack-texts

Import the package and specify keys:

var slack_texts = require('slack-texts');

var keys = {
    slack: {
        token: '<slack-token>'
    },
    twilio: {
        sid:   '<twilio-sid>',
        token: '<twilio-token>',
        phone: '<twilio-phone>'
    }
};

var options = {
    team_name:                'go-team',
    ignore_case_keywords:     true,
    keywords:                 ['economy', 'responsive'],
    channel_names_to_monitor: ['announcements', 'development'],
    send_to_contacts:         [
        { phone: '+10000000000' },
        { phone: '+19999999999' },
        { phone: '+15555555555' }
    ]
};

var st = slack_texts.init(keys, options);
st.start(); // Async call.

// Do other stuff here, if necessary.

Run:

$ node app.js

Features

  • Specify phone numbers to send messages to
  • Monitor a specific list (or all) channels
  • Use only messages that contain specified keywords

Documentation

init()

Initializes and returns a new slack_texts instance. It the same as calling new slack_texts(..).

var slack_texts = require('slack-texts');
var st = slack_texts.init(keys, options);

The two arguments are:

  1. keys:

    Twilio and Slack API keys, as shown in the Quick start section. All fields are required.

  2. options:

    Configuration for the slack_texts instance. The default values are shown below.

    {
        // The team name to display in text messages.
        // Type: string.
        team_name:                '',
    
        // Whether to ignore case when filtering messages by keyword.
        // Type: boolean.
        ignore_case_keywords:     true,
    
        // Keywords to filter messages by. If a messages contains any
        // of the keywords, it will be used for text notifications.
        // To disable keyword filtering, leave the property undefined
        // or use an empty array.
        //
        // Type: Array<string>.
        keywords:                 [],
    
        // The channels to listen to. If a message is sent to these channels,
        // it will be used for text notifications (subject to other
        // configuration). To listen to all channels, leave the property
        // undefined or use an empty array.
        //
        // Type: Array<string>.
        channel_names_to_monitor: [],
    
        // List of objects, each object containing a phone field (string).
        // Text messages will be sent to these phones.
        // 
        // Type: Array<Object>
        send_to_contacts:         []
    }

start()

Listens for new messages asynchronously, and dispatches text messages depending on the provided options. The method takes no arguments.

var slack_texts = require('slack-texts');
var st = slack_texts.init(keys, options);
st.start();

Contributing

Pull requests are welcome.

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

You can also create an issue for new features and bug fixes.

License

The MIT License. Please see the LICENSE file at the root of this repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].