Search emails by query and filters. Works across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP.
The nylas email search command finds emails matching a query across your connected mailbox. Filter by sender, date range, read status, or attachment presence.
Syntax
nylas email search \
Enter fullscreen mode
Exit fullscreen mode
Example
nylas email search
Enter fullscreen mode
Exit fullscreen mode
Tips
Combine with other commands: Chain nylas email search with other Nylas CLI commands using shell pipes and variables for complex workflows.
Debug mode: Add --verbose to see the underlying API requests and responses â useful when something doesn't behave as expected.
How It Works
The Nylas CLI abstracts away the differences between Gmail's API, Microsoft Graph, Exchange Web Services, and raw IMAP. You write one command; it works across all providers. This matters for automation â your cron job or CI pipeline doesn't need provider-specific logic.
Related Commands
Full docs: nylas email search reference â all flags, advanced examples, and troubleshooting.
All commands: Nylas CLI Command Reference
Get started: brew install nylas/nylas-cli/nylas â other install methods