Command
nylas email attachments list
List all attachments on a specific email.
Written by Qasim Muhammad Staff SRE
What does nylas email attachments list do?
The nylas email attachments list command shows every attachment on a message — filename, MIME type, and size. Pipe through jq to filter by type or find large files before downloading.
Usage
nylas email attachments list <message-id> [grant-id] [flags]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 |
Examples
The nylas email attachments list command shows every attachment on a message — filename, MIME type, and size.
List attachments on an email
nylas email attachments list msg_abc123Filter PDFs with jq
nylas email attachments list msg_abc123 --json | jq '.[] | select(.content_type == "application/pdf")'Example output
FILENAME TYPE SIZE
q3-roadmap.pdf application/pdf 284 KB
budget.xlsx application/xlsx 41 KB
2 attachmentsTroubleshooting
No attachments returned for a message that has them
Some providers embed inline images as attachments. Try --json to see all entries including inline content.
Message ID not found
Run nylas email search "*" --has-attachment --json to find messages with attachments and their IDs.
Recommended guides
List Fastmail emails from the CLI
List Fastmail emails from the CLI through Nylas IMAP access, using app passwords, inbox filters, JSON output, and Fastmail-specific auth troubleshooting.
Why Cloud Servers Block SMTP Ports
AWS, GCP, and Azure block outbound SMTP port 25 while ports 587 and 465 stay open. Confirm the block and send email over an HTTPS API instead.
Send Email From a Docker Container
Cloud providers block SMTP port 25 from containers. Send email over an HTTPS API on port 443 with one command and no mail daemon at all.
MailerSend vs Nylas: Email Compared
MailerSend sends transactional email from verified domains. Nylas reads and syncs user inboxes across 6 providers. Compare features, pricing, and use cases.
Customer.io vs Nylas: Email Compared
Customer.io sends lifecycle emails to your user base. Nylas reads and sends from real user inboxes via OAuth. Compare use cases, pricing, and AI agent support.
Knock vs Nylas: Notifications vs Email API
Knock delivers multi-channel product notifications via workflows; Nylas provides two-way email and calendar sync. Compare scope, pricing, and agent support.
Run nylas email attachments list --help for full help output.