https://github.com/mehdibo/SlackBatch
Send batch invites from the CLI.
https://github.com/mehdibo/SlackBatch
Last synced: 6 months ago
JSON representation
Send batch invites from the CLI.
- Host: GitHub
- URL: https://github.com/mehdibo/SlackBatch
- Owner: mehdibo
- License: mit
- Created: 2018-10-02T12:36:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T10:59:38.000Z (about 6 years ago)
- Last Synced: 2024-10-19T01:13:30.317Z (about 1 year ago)
- Language: PHP
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-morocco - SlackBatch - A CLI tool made with PHP to send Slack invitations (Uncategorized / Uncategorized)
README
# SlackBatch
Send Slack workspace invites to multiple e-mails from the CLI.
# Usage
```sh
$>./slackbatch.php -h
USAGE:
slackbatch.php
Send batch Slack invitations using the Slack API.
OPTIONS:
--f Source options: file
--fail-abort If an invite fails abort sending.
--token Slack legacy auth token.
-h, --help Display this help screen and exit immeadiately.
--no-colors Do not use any colors in output. Useful when piping output to other tools or files.
--loglevel Minimum level of messages to display. Default is info. Valid levels are: debug, info, notice, success,
warning, error, critical, alert, emergency.
ARGUMENTS:
E-mails source.
```
You need a legacy token, you can get one [from here](https://api.slack.com/custom-integrations/legacy-tokens).
Currently SlackBatch only handles files, so you need to pass a file containing new line separated e-mails.
## Example:
```sh
$> ./slackbatch.php --f file --token "MY_LEGACY_TOKEN" emails.txt
✓ Invite sent to: email@example.com
✓ Invite sent to: emaila@example.com
✓ Invite sent to: emailb@example.com
✓ Invite sent to: emailc@example.com
✓ Invite sent to: emaild@example.com
✓ Invite sent to: emaile@example.com
```