{"id":16581892,"url":"https://github.com/nishanths/slack-texts","last_synced_at":"2025-10-29T07:31:28.278Z","repository":{"id":31408011,"uuid":"34971307","full_name":"nishanths/slack-texts","owner":"nishanths","description":"SMS notifications for Slack groups","archived":false,"fork":false,"pushed_at":"2017-01-09T12:02:45.000Z","size":25,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T23:26:51.580Z","etag":null,"topics":["notifications","slack","sms"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nishanths.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-03T02:40:37.000Z","updated_at":"2023-04-06T20:51:05.000Z","dependencies_parsed_at":"2022-09-26T16:21:34.710Z","dependency_job_id":null,"html_url":"https://github.com/nishanths/slack-texts","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fslack-texts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fslack-texts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fslack-texts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fslack-texts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishanths","download_url":"https://codeload.github.com/nishanths/slack-texts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238791853,"owners_count":19531026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notifications","slack","sms"],"created_at":"2024-10-11T22:30:12.717Z","updated_at":"2025-10-29T07:31:23.011Z","avatar_url":"https://github.com/nishanths.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [slack-texts](https://github.com/nishanths/slack-texts) \n\n[![NPM version](https://img.shields.io/npm/v/slack-texts.svg)](https://www.npmjs.com/package/slack-texts) [![License shield](https://img.shields.io/npm/l/slack-texts.svg)](https://github.com/nishanths/slack-texts/blob/master/LICENSE)\n\nReceive text messages for conversations on [Slack](http://slack.com)\nchannels using Twilio.\n\nYou can import it as a package (see below), or use it directly from the [command-line](https://github.com/nishanths/slack-texts/blob/master/cmd/slack-texts).\n\n## Quick start\n\nInstall via npm:\n\n```sh\n$ npm install --save slack-texts\n```\n\nImport the package and specify keys:\n\n```js\nvar slack_texts = require('slack-texts');\n\nvar keys = {\n    slack: {\n        token: '\u003cslack-token\u003e'\n    },\n    twilio: {\n        sid:   '\u003ctwilio-sid\u003e',\n        token: '\u003ctwilio-token\u003e',\n        phone: '\u003ctwilio-phone\u003e'\n    }\n};\n\nvar options = {\n    team_name:                'go-team',\n    ignore_case_keywords:     true,\n    keywords:                 ['economy', 'responsive'],\n    channel_names_to_monitor: ['announcements', 'development'],\n    send_to_contacts:         [\n        { phone: '+10000000000' },\n        { phone: '+19999999999' },\n        { phone: '+15555555555' }\n    ]\n};\n\nvar st = slack_texts.init(keys, options);\nst.start(); // Async call.\n\n// Do other stuff here, if necessary.\n```\n\nRun: \n\n```sh\n$ node app.js\n``` \n\n## Features\n\n* Specify phone numbers to send messages to\n* Monitor a specific list (or all) channels\n* Use only messages that contain specified keywords\n\n## Documentation\n\n#### init()\n\nInitializes and returns a new slack_texts instance. It the same as calling\n`new slack_texts(..)`. \n\n```\nvar slack_texts = require('slack-texts');\nvar st = slack_texts.init(keys, options);\n```\n\nThe two arguments are:\n\n1. keys:\n\n\tTwilio and Slack API keys, as shown in the Quick start section. \n\tAll fields are required.\n\n1. options: \n\n\tConfiguration for the `slack_texts` instance.\n\tThe default values are shown below.\n\t\n\t```js\n\t{\n\t    // The team name to display in text messages.\n\t    // Type: string.\n\t    team_name:                '',\n\t\n\t    // Whether to ignore case when filtering messages by keyword.\n\t    // Type: boolean.\n\t    ignore_case_keywords:     true,\n\t\n\t    // Keywords to filter messages by. If a messages contains any\n\t    // of the keywords, it will be used for text notifications.\n\t    // To disable keyword filtering, leave the property undefined\n\t    // or use an empty array.\n\t    //\n\t    // Type: Array\u003cstring\u003e.\n\t    keywords:                 [],\n\t\n\t    // The channels to listen to. If a message is sent to these channels,\n\t    // it will be used for text notifications (subject to other\n\t    // configuration). To listen to all channels, leave the property\n\t    // undefined or use an empty array.\n\t    //\n\t    // Type: Array\u003cstring\u003e.\n\t    channel_names_to_monitor: [],\n\t\n\t    // List of objects, each object containing a phone field (string).\n\t    // Text messages will be sent to these phones.\n\t    // \n\t    // Type: Array\u003cObject\u003e\n\t    send_to_contacts:         []\n\t}\n\t```\n\n#### start()\n\nListens for new messages asynchronously, and dispatches text messages\ndepending on the provided options. The method takes no arguments.\n\n```\nvar slack_texts = require('slack-texts');\nvar st = slack_texts.init(keys, options);\nst.start();\n```\n\n## Contributing\n\nPull requests are welcome.\n\n1. Fork the repository\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n\nYou can also create an [issue](https://github.com/nishanths/slack-texts/issues) for new features and bug fixes.\n\n## License\n\nThe MIT License. Please see the [LICENSE](https://github.com/nishanths/slack-texts/blob/master/LICENSE) file at the root of this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishanths%2Fslack-texts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishanths%2Fslack-texts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishanths%2Fslack-texts/lists"}