Command
nylas slack send
Send a message to a Slack channel.
Written by Qasim Muhammad Staff SRE
What does nylas slack send do?
The nylas slack send command posts a message to any Slack channel your token has access to. Specify the channel with --channel and the message with --text. To reply in a thread, use the dedicated nylas slack reply command instead.
Usage
nylas slack send --channel CHANNEL --text TEXTFlags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --channel | Channel ID or name |
| --text | Message text to send |
| --yes(-y) | Skip the send confirmation prompt |
| --channel-id | Channel ID |
Examples
Send to a channel
nylas slack send --channel general --text "Deploy complete for v2.4.1"Skip the confirmation prompt in scripts
nylas slack send --channel deploys --text "Build #482 green" --yesExample output
Send to #general as Alice Chen:
"Hello team!"
✓ Message sent to #generalTroubleshooting
not_in_channel error
Invite the bot to the channel first with /invite @your-bot-name, or use a user token instead.
Message sends but shows as bot instead of user
Bot tokens (xoxb-) always post as the bot. Use a user token (xoxp-) to post as yourself.
Run nylas slack send --help for full help output.