Command

nylas email drafts list

List email drafts in your mailbox.

Written by Qasim Muhammad Staff SRE

What does nylas email drafts list do?

The nylas email drafts list command shows all saved drafts across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP accounts. Use --json to pipe draft data into scripts or count drafts programmatically.

Usage

nylas email drafts list [--limit N] [--json]

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limit(-l)Maximum number of drafts to return
--yes(-y)Skip confirmations

Examples

The nylas email drafts list command shows all saved drafts across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP accounts.

List recent drafts

nylas email drafts list --limit 10

Count total drafts

nylas email drafts list --json | jq length

Example output

ID           SUBJECT              TO
draft_abc123 Q3 planning          alice@example.com
draft_def456 Re: Invoice #482     bob@example.com

2 drafts

Troubleshooting

No drafts returned even though they exist in webmail

Some IMAP servers store drafts in a non-standard folder. Check your provider's draft folder naming conventions.

Drafts from a shared mailbox are missing

Shared mailbox drafts require a separate grant. Run nylas auth login for the shared mailbox account.

Recommended guides

Run nylas email drafts list --help for full help output.