Actions13
Email → Получить список
AI-generatedSummary
Fetches and returns a list of emails from an IMAP mailbox with extensive filtering and data selection options.
Inputs
- authentication (required) — Credential type to use: IMAP Fork Credentials (default) or N8N IMAP Trigger node credentials.
- mailboxPath (required) — The mailbox folder to query. Select from a list of available mailboxes or specify a full path.
- emailDateRange — Optional date range filter (since/before) to restrict search to specific dates.
- emailFlags — Flags to filter emails by: recent, answered, flagged, seen (read/unread), deleted, or draft.
- uidFilter — Filter by Email UID (e.g., '42', '42,43,44', or '1:100').
- relativeDays — Number of days (plus hours/minutes) relative to now to filter emails.
- relativeDirection — Direction for relative date filter: 'within' (newer) or 'older'.
- relativeTimezone — Timezone to use for relative date calculations (default is system).
- clientSubjectContains — Filter emails by subject text (case-insensitive, comma-separated terms supported).
- clientBodyContains — Filter emails by body text (text or HTML). Automatically fetches email bodies for matching.
- clientTextFilterOptions — Options for text filters: matchAll (AND) or caseSensitive.
- emailSearchFilters — Server-side IMAP filters for specific fields: from, to, subject, body, cc, bcc, uid.
- returnSubject — Include the email subject in the output.
- returnFrom — Include the sender (From) field in the output.
- returnTo — Include the recipient list (To) in the output.
- returnCc — Include the CC field in the output.
- returnBcc — Include the BCC field in the output.
- returnDate — Include the email date in the output.
- returnMessageId — Include the global Message-ID header in the output.
- returnText — Download and return the plain-text body of emails.
- returnHtml — Download and return the HTML body of emails.
- returnFlags — Include email flags (e.g., seen, flagged) in the output.
- returnSize — Include the size of the email in bytes in the output.
- returnHeaders — Include email headers in the output (default is all).
- returnAttachmentsInfo — Include metadata (name, MIME type, size) of attachments without downloading them.
- downloadAttachments — Download all attachments for each email as binary data fields.
- includeInlineAttachments — When downloading attachments, also download inline attachments (e.g., embedded images).
Output shape
A list of items, one per email found.
If a client-side text filter is active, emails are filtered after fetching. If no active filters are present and downloadAttachments is enabled, all emails in the mailbox are downloaded (a warning is logged).
Examples
Example 1: Retrieve unread emails from the last 24 hours with their text body.
Mailbox: INBOX, Flags: Seen=false, Relative Days: 1, Return Text: true
Example 2: Get emails containing specific keywords in the subject or body from the last week.
Client Subject/Body Contains: 'invoice', 'report', Match All: true, Relative Days: 7
Example 3: Download attachments for all emails found in a specific folder.
Mailbox: custom/folder, Download Attachments: true, Include Inline: true