Command
nylas slack search
Search Slack messages across channels.
Written by Qasim Muhammad Staff SRE
What does nylas slack search do?
The nylas slack search command searches your Slack workspace for messages matching a query string. Results include the channel, sender, timestamp, and message text. Use --limit to cap the number of results returned. Slack query modifiers like from:@user and in:#channel are supported.
Usage
nylas slack search --query QUERY [--limit N]Flags
| 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 |
| --query | Search query string |
| --limit | Maximum number of results |
| --id | Show message IDs |
Examples
Search by keyword
nylas slack search --query "deployment failed" --limit 10Search messages from a specific user
nylas slack search --query "from:@alice OAuth token"Example output
Results for "release" (3 matches)
#general Alice Chen Cutting the release now
#engineering Bob Smith Release notes are ready for review
#engineering Alice Chen Release shipped to production
3 resultsTroubleshooting
No results for known messages
Slack search requires the search:read scope on your token. Verify at api.slack.com/apps.
Results missing messages from private channels
User tokens (xoxp-) can search private channels the user belongs to. Bot tokens cannot search private channels.
Run nylas slack search --help for full help output.