Actions13
Email → Get Many
AI-generatedOverview
This node operation retrieves multiple emails from an IMAP mailbox based on specified criteria. It is useful for scenarios where you need to fetch a list of emails filtered by date range, flags, search filters, or specific UIDs. For example, you can use it to get all unread emails from the INBOX received since a certain date, or to fetch emails flagged as important with specific subject keywords.
Use Case Examples
- Fetch up to 50 recent unread emails from the INBOX mailbox.
- Retrieve emails flagged as answered and containing specific text in the subject.
- Get emails within a date range and filter by sender or recipient addresses.
Properties
| Name | Meaning |
|---|---|
| Credential Type | Selects which IMAP credentials to use for connecting to the mailbox. |
| Mailbox | The mailbox path to retrieve emails from, e.g., INBOX. |
| Date Range | Filters emails by date, specifying start (since) and end (before) dates. |
| Flags | Filters emails based on IMAP flags such as answered, deleted, draft, flagged, recent, seen, or custom flags. |
| Search Filters | Additional case-insensitive filters combined with AND logic, such as filtering by BCC, CC, From, Subject, Text, To, or specific UIDs. |
| Limit | Maximum number of emails to return to prevent memory issues and long execution times. |
| Include Message Parts | Select which parts of the email to include in the output, such as text content, HTML content, attachments info, flags, size, body structure, and headers. |
| Include All Headers | Whether to include all headers in the output when headers are included. |
| Headers to Include | Comma-separated list of specific headers to include if not including all headers. |
Output
JSON
uid- Unique identifier of the emailflags- Flags set on the email, e.g., seen, answereddate- Date the email was sent or receivedfrom- Sender's email addressto- Recipient email addressescc- CC recipient email addressesbcc- BCC recipient email addressessubject- Subject line of the emailtextContent- Plain text content of the email if includedhtmlContent- HTML content of the email if includedattachmentsInfo- Information about attachments if includedsize- Size of the email if includedbodyStructure- Structure of the email body if includedheaders- Email headers if included
Dependencies
- IMAP server credentials (either node-specific or from N8N IMAP Trigger node)
Troubleshooting
- Connection failures due to incorrect IMAP credentials or network issues. Verify credentials and network connectivity.
- Errors during email retrieval may occur if the mailbox path is incorrect or the IMAP server is unreachable.
- If the operation returns no data, check the filter criteria such as date range, flags, and search filters to ensure they match existing emails.
- Errors related to IMAP protocol or unexpected server responses are caught and logged; reviewing logs can help identify issues.