Help Centre › Building Processes
Iterate over each email in an Outlook folder: unread ones unless the filters say otherwise (unread, importance, subject, sender, attachments)
Add it to a process
In the process designer, open the Add step tab. Find For each email under Loop, or type its name in the search box, and drag it onto the canvas.
Fields
| Field | Required | What it does |
|---|---|---|
| Loop variable | Yes | Name of the variable that will represent each item in the loop. |
| Account / e-mail address | Yes | The e-mail account as it appears in Outlook |
| Folder / mailbox | Yes | The Outlook folder to check for unread e-mails (e.g. Inbox). |
| Read state | No | Unread emails only (the usual choice), read ones only, or every email in the folder. A step saved before this field existed loops over unread emails. Choices: Unread only, Read only, Any. Default: unread. |
| Importance | No | Only emails with this importance. High is the red exclamation mark. Leave blank for any. Choices: Any, High, Normal, Low. |
| Subject contains | No | Only emails whose subject contains this text. |
| Sender contains | No | Only emails whose sender name or address contains this text. |
| Attachments | No | Only emails with attachments, or only those without. Leave blank for any. Choices: Any, With attachments, Without attachments. |
| Maximum loops | No | Limit the maximum number of loop iterations. Leave blank for no limit. |
| Match | Yes | How the filter rows combine: every row must match, at least one must, none may, or exactly one must. Choices: All of these (AND), Any of these (OR), None of these, Exactly one of these. Default: and. |
| Marks a transaction | No | Each loop iteration is treated as a separate transaction for reporting. |
| Transaction key | No | Formula naming each iteration's transaction, evaluated per row against the live state (e.g. '{row[Reference]}'). Leave blank and every iteration reports the same key and cannot be told apart in reporting. |
| Transaction additional info | No | Optional. Anything else worth keeping about each item - leave blank and nothing is stored. |
| Transaction attachments | No | Optional. Files to keep with EACH iteration, evaluated per row - one path per line, or a variable holding a path or a list of paths. Nothing is uploaded unless you fill this in. |
| Keys | No | Optional filters. Rows of field/operator/value; a record must match to be looped. |
See all Loop steps.
Errors
| Error | Description |
|---|---|
| Outlook not open | Outlook is not running |
| Folder not found | The folder does not exist |
Tips
- Loops through the emails in the Outlook folder that pass the filters: unread ones unless Read state says otherwise
- The trigger that starts the process and this loop should ask for the same emails. An email the trigger starts a run for but the loop leaves out stays unread and starts another run on the next poll; the bot's process check warns about this (
trigger_step_filter_mismatch). - Each e-mail is automatically marked as read after processing