List folders. Works across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP.
The nylas email folders list command displays all email folders and labels in your connected mailbox — Inbox, Sent, Drafts, Trash, and any custom folders. Works with Gmail labels, Outlook folders, and IMAP mailboxes.
Syntax
nylas email folders list
Examples
List folders:
nylas email folders list
JSON output:
nylas email folders list --json
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.
Tips
CI/CD ready: This command works in non-interactive mode. Set NYLAS_API_KEY as an environment variable and it picks up credentials automatically.
Pipe to jq: nylas email folders list --json | jq '.' gives you structured data you can filter and transform.
Full docs: nylas email folders list reference — all flags, advanced examples, and troubleshooting.
All commands: Nylas CLI Command Reference
Get started: brew install nylas/nylas-cli/nylas — other install methods
Top comments (0)