Skip to main content
Version: 3.2

IMAP Nodes

Search a mailbox folder, fetch a message with its attachments, and move or flag messages from a pipeline.

Operations
Search · Fetch · Move · Flag
Output
Message summaries, a decoded message, the UIDs changed

IMAP is how a program reads a mailbox. MaestroHub provides four nodes for an IMAP connection; to start a pipeline when email arrives, use the IMAP Trigger. Each node runs a function of the IMAP connection.

Configuration Quick Reference​

FieldWhat you chooseDetails
ParametersConnection, Function, Function Parameters, Timeout OverrideSelect the connection profile, function, configure function parameters with expression support, and optionally override timeout.
SettingsDescription, Timeout (seconds), Retry on Timeout, Retry on Fail, On ErrorNode description, maximum execution time, retry behavior on timeout or failure, and error handling strategy. All execution settings default to pipeline-level values.
IMAP Search Messages nodeIMAP Search Messages node

IMAP Search Messages Node

IMAP Search Messages Node​

Find messages in a folder and return a summary of each, newest first. Nothing is marked read.

ExpressionDescription
$node["Name"].result.folderThe folder searched
$node["Name"].result.uidValidityThe folder's UIDVALIDITY; pass it with a UID to the Move and Flag nodes
$node["Name"].result.totalHow many messages matched, before Max Results
$node["Name"].result.truncatedtrue when more matched than were returned
$node["Name"].result.unreadableUIDs of matching messages MaestroHub cannot read (the server describes them in a form the IMAP library cannot parse, even raw); present only when there are some
$node["Name"].result.messagesThe newest matches first: uid, messageId, subject, from, date, size, seen, flags, attachmentCount
IMAP Fetch Message nodeIMAP Fetch Message node

IMAP Fetch Message Node

IMAP Fetch Message Node​

Fetch one message by UID with its text, HTML and attachments. The message is not marked read. A message the IMAP library cannot parse is read raw instead; one that cannot be read either way fails for good, and is not retried.

ExpressionDescription
$node["Name"].result.folder, $node["Name"].result.uid, $node["Name"].result.uidValidityWhere the message is
$node["Name"].result.flagsThe message's flags, e.g. \Seen
$node["Name"].result.subjectThe Subject header, decoded
$node["Name"].result.from, $node["Name"].result.fromAddressThe first sender with its name, and its address alone
$node["Name"].result.to, $node["Name"].result.cc, $node["Name"].result.replyToAddress lists; cc and replyTo only when the message has them
$node["Name"].result.dateThe Date header, UTC RFC 3339, when present
$node["Name"].result.messageId, $node["Name"].result.inReplyToThe Message-ID and In-Reply-To headers, when present
$node["Name"].result.text, $node["Name"].result.htmlThe plain-text and HTML bodies decoded to UTF-8, when present
$node["Name"].result.textTruncated, $node["Name"].result.htmlTruncatedtrue when a body was longer than 1 MB and is cut
$node["Name"].result.sizeThe whole message's size in bytes
$node["Name"].result.attachmentsEach attachment: filename, contentType, size, part, and content (base64) within the cap, else contentOmitted with the reason
IMAP Move Messages nodeIMAP Move Messages node

IMAP Move Messages Node

IMAP Move Messages Node​

Move messages by UID to another folder with IMAP MOVE; repeating a move is harmless, since a UID already moved is reported in notFound. It needs a server with MOVE (RFC 6851): on a server without it the node is refused with that reason, and nothing is copied or deleted.

ExpressionDescription
$node["Name"].result.folder, $node["Name"].result.destinationFrom where, to where
$node["Name"].result.movedThe UIDs moved
$node["Name"].result.notFoundThe UIDs that were not in the folder; nothing was done for them
$node["Name"].result.destinationUidsThe moved messages' UIDs in the destination, when the server reports them
IMAP Flag Messages nodeIMAP Flag Messages node

IMAP Flag Messages Node

IMAP Flag Messages Node​

Add or remove flags such as \Seen or \Flagged on messages by UID.

ExpressionDescription
$node["Name"].result.folderThe folder the messages are in
$node["Name"].result.actionadd or remove
$node["Name"].result.flagsThe flags added or removed
$node["Name"].result.updatedThe UIDs changed
$node["Name"].result.notFoundThe UIDs that were not in the folder

Output Metadata​

ExpressionDescription
$node["Name"]._metadata.method, $node["Name"]._metadata.connectionId, $node["Name"]._metadata.protocolThe call's own facts, on every node: the operation, the connection it ran over, imap
Looking for a trigger on new email?

To start a pipeline when email arrives, use the IMAP Trigger Node.