Help Centre › Building Processes
An email's fields depend on where it came from. An Outlook find result, an unread email in a loop, an IMAP/POP3 message and an Outlook thread each carry a different set. This page lists each set, says which bot version you need, and shows how to write the fields.
The rules below about missing fields apply to trigger filters and loop filters. An if-step (Decision) keeps the old comparison: a field that does not exist there is read as the text #VAR!.
1. How to write a field
- In a New email trigger filter, use the field name on its own:
{sender}. This works from bot 6.6.4. - In a loop over emails, put the loop variable first. If you named the loop variable
email, write{email::sender}. Inside the loop, the short form{sender}also works. - After a Find step, the variable holds a list of emails, so pick one first, for example
{emails::0::sender}. - A name with a space is written as it is, with no quotes:
{email::auto response}. - Compare a field, not the whole email.
{email}= x never matches, because{email}holds every field at once. Write{email::sender}instead. - What a filter can read. A trigger filter reads only the email's own fields and the clock, such as
{now::time}. It cannot read Assets or process variables, because it runs before the process starts. Loop filters and if-steps can read Assets. - In a "Matches regex" value, braces are read as a variable:
{3}in^INV\d{3}$becomes empty. Write^INV\d\d\d$instead.
Important: use the exact field name, with the same capital letters. A filter row that names a field that does not exist fails, and the bot logs the fields the email does have. Is empty and Is not empty still answer: a missing field counts as empty.
Older bots:senderandsender_name, and in the unread email loop alsohas_attachmentsandtotal_attachments, need bot 6.6.8 or later. On an older bot use{email::from::email}for the address and{email::from::name}for the name. Before 6.6.8 a missing field did not fail the row: with a "not" operator every item got through, and with any other operator none did. Update the bot if you can.
2. Email (Outlook find, and the New email trigger)
Each email from OUTLOOK Find an e-mail, and the email that fires a New email trigger. Outlook only.
sender | The sender's email address. Use this one to check who an email is from. |
sender_name | The sender's display name, e.g. Jane Smith |
subject | The subject line |
body | The message text |
has_attachments | Whether the email has attachments (true or false). On an Outlook find result this works on every bot version. |
total_attachments | How many attachments it has. On an Outlook find result this works on every bot version. |
to | The To addresses, as a list |
cc | The Cc addresses, as a list |
timestamp | When it was sent, YYYY-MM-DD HH:MM |
unread | Whether it is still unread (true or false) |
id | Outlook's own id for the email |
messageId | The internet message id |
from | The sender, with two parts: {from::name} and {from::email}. Kept so older processes keep working; use sender on bot 6.6.8 or later. |
auto_reply | Whether a machine sent it in answer to another email: an out-of-office reply, a bounce or a read receipt (true or false). Bot 6.7.8 or later. |
From bot 6.8.5 these fields are also there:
receivedAt | When it arrived, in UTC |
body_truncated | Whether body holds only the first 500 characters (Find email) |
conversationId | Outlook's id for the thread: the same for every email in it |
inReplyTo | The message id of the email this one answers |
references | The message ids of the earlier emails in the thread, oldest first |
originalSender, originalSenderName | For a forwarded email: who wrote it, read from the forwarded part |
forwardedBy | For a forwarded email: who forwarded it |
3. Unread email (loops and single Outlook emails)
Each email in Loop through unread emails, and the email from the Outlook steps that fetch one email: get an email by id, wait for an email, and select an email. Outlook only. It has every field in section 2, plus the ones below. In the loop, sender, sender_name, has_attachments and total_attachments need bot 6.6.8 or later.
attachments | The attachment files the step saved, as a list of full paths |
attachmentNames | Each attachment's name in the email, in the same order (bot 6.8.5 or later) |
attachmentsInEmail | How many attachments the email holds, saved or not (bot 6.8.5 or later) |
auto response | The old automatic-reply check, kept so older processes behave as before. New processes should use auto_reply. Write {email::auto response}. |
total attachments | The old spelling of total_attachments, kept for older processes |
4. IMAP and POP3 email
A full message read from an IMAP or POP3 mailbox. List and search results carry only some of these fields.
sender | The sender's email address |
sender_name | The sender's display name |
subject | The subject line |
from | The raw sender text from the email header, e.g. Jane Smith <jane@example.com>. It has no parts; use sender for the address. |
to | The To addresses |
cc | The Cc addresses |
date | When it was sent (IMAP has no timestamp) |
message_id | The internet message id |
body | The message text |
html | The message as HTML |
attachments | The attachments |
auto_reply | Whether it is an automatic reply (true or false). Bot 6.7.8 or later. |
5. Outlook thread email
Each email in the result of the Outlook step that reads a conversation thread. Outlook only.
sender | The sender's email address |
sender_name | The sender's display name |
subject | The subject line |
timestamp | When it was sent, YYYY-MM-DD HH:MM |
id | Outlook's own id for the email |
6. Example: skip emails from one sender
To start a process for every new email except those from your manager, add this filter to the New email trigger:
| Filter | {sender} |
| Operator | != (does not equal) |
| Value | boss@example.com |
In a loop over unread emails with the loop variable email, the same filter is {email::sender} != boss@example.com on bot 6.6.8 or later. On an older bot, write {email::from::email} != boss@example.com.
A common mistake is {email::from} or {email::sender name}: the first holds a name and an address together, so it never equals an address, and the second is not a field.
7. Fields for other triggers
- File added / changed / removed / renamed – the file fields, such as
{name},{extension}and{path}. See Loop variables for the full list. - Folder added / changed / removed / renamed – the folder fields, such as
{name}and{path}. - Queue item available –
id,reference,priority,status,specificContent(the item's own data, e.g.{specificContent::invoice number}),deferDate,dueDate,retryNumberandcreatedAt. - Schedule and Every few seconds – no item fields.
Every trigger can also read the current time, for example {now::time} or {now::date}. See Built-in variables.