Get email
Description
Looks up a single message by its UID in a folder and returns it as an email object. A UID the folder does not hold is not an error: the returned object has exists = false so the flag can be branched on. The error branch is taken only for connection or protocol failures.
When to use
Use Get email to re-open a specific message in a later run, when you stored its UID somewhere the first time. Within one run you rarely need it — Find emails already hands you the whole object.
A missing UID is a normal outcome, not a failure: the message may have been
moved, deleted, or expunged by someone else since you recorded it. The
result therefore arrives on the Success pin with exists = false. Break
the email and wire exists into a Branch before doing anything with it. The
Error pin fires only for connection and protocol problems.
Be careful storing UIDs across time. A UID is unique only within one folder, and a server that resets a folder’s UIDVALIDITY invalidates every UID in it. For most polling pipelines, filtering on the unread flag is a more robust way to track what has been handled than remembering UIDs.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Credentials | Email credentials | — | Email credentials produced by any of the three email credentials nodes. |
| Folder | string | INBOX | Folder the UID belongs to. A UID only identifies a message within one folder — the same message in another folder has a different UID. |
| UID | integer | — | The message's IMAP UID, as reported by an earlier Find emails (Break an email object to read its `uid` field). |
Output pins
| Pin | Type | Notes |
|---|---|---|
| The message. When no message with that UID is in the folder, the object comes back on the Success pin with `exists` = false, `folder` and `uid` echoing what was asked for, and every content field null. |
Execution pins
| Pin | Direction |
|---|---|
| In | Input |
| Success | Output |
| Error | Output |
Example
Re-check a message a human was asked to approve. Read the stored UID with a
Read variable node, wire it into Get email along with Folder INBOX and the
credentials. On Success, Break the result and Branch on exists: the false
path logs “the message is gone”, the true path continues into Read email.