Help Centre › Building Processes
This article describes the RPA Outlook functionality to count e-mails.
For a full list of available functions, please read OUTLOOK functions.
Description
The OUTLOOK Count e-mails function allows you to count e-mails in a folder, optionally filtered by criteria such as unread status, subject, or sender. Returns an integer.
Setting it up
To use the OUTLOOK Count e-mails function, follow these instructions:
{{popups:rpas/add:action=outlook-mail-count}}
Once on a process map:
- Navigate to the process where you would like to add the OUTLOOK Count e-mails function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the OUTLOOK Count e-mails option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Account | Yes | Text | - | The Outlook e-mail account |
| Folder / mailbox | No | Text | Inbox | Folder path to count in |
| Unread only | No | Switch | Off | Count only unread e-mails |
| Subject filter | No | Text | - | Count only e-mails matching this subject substring |
| Sender filter | No | Text | - | Count only e-mails from this sender |
| Variable | Yes | Text | - | Variable to store the count |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Number | The count of matching e-mails |
Errors
| Error | Description |
|---|---|
| Outlook not open | Outlook is not running |
| Folder not found | The specified folder does not exist |
Tips
- Use this to check if there are unread e-mails before processing
- Combine with a condition to only proceed when the count is greater than zero