UiPath Get Outlook Message Filter Example |Video upload date:  · Duration: PT8M9S  · Language: EN

Learn how to use UiPath Get Outlook Mail Messages with filter strings to fetch specific emails fast and reliably for automation workflows

Target specific Outlook messages in UiPath with filter expressions and tips

If you want your UiPath robot to stop collecting every promotional email and start focusing on the important stuff like invoices or support requests then Get Outlook Mail Messages with a proper filter is your friend. This guide explains how to configure the activity use Outlook restriction syntax and process the results as a List MailMessage without turning your robot into an overworked spam collector.

When to use Get Outlook Mail Messages

Use this activity when an Outlook client is available on the robot machine. The Output property expects a variable typed as List MailMessage so downstream steps can access Subject From Body ReceivedTime and attachments. This approach keeps the automation fast and avoids scanning the entire mailbox like a lost intern.

Key properties to set

  • MailFolder set to Inbox or a named subfolder to narrow the search
  • Top limit the number of messages during testing to save time
  • OnlyUnread skip already processed messages to avoid duplicates
  • MarkAsRead toggle when you want the robot to flag messages as handled
  • Filter supply an Outlook restriction string to target exactly what you need

Filter examples and practical tips

The Filter field expects Outlook restriction syntax using square bracket field names and operators such as = LIKE >=. It is smart but picky so test filter strings directly in Outlook search before you run a production job. Use clear date formats like yyyy-MM-dd for ReceivedTime to get predictable results.

[Subject] LIKE 'Invoice%'
[From] = 'billing@example.com'
[ReceivedTime] >= '2020-08-01'

You can combine conditions with AND and OR to refine matches. If the filter fails test it in Outlook search and tweak it before deploying. Saving debugging time is the most satisfying thing short of coffee.

Processing the results

Assign the Output to a variable named messages typed as List MailMessage and loop with For Each to inspect each item. Access item.Subject item.From item.Body and item.ReceivedTime. Save attachments or write a small summary for downstream automation. Wrap this work in a Try Catch to handle network issues malformed messages or unexpected nulls without bringing the whole process to a halt.

  • For Each mail in messages do your checks and business logic
  • Use OnlyUnread and MarkAsRead strategically to avoid reprocessing
  • Limit Top during development to speed up iterations

Development and deployment tips

During development keep OnlyUnread and Top enabled to limit workload and speed testing. If your robot lacks an Outlook client you will need an alternative like the Exchange or Graph API which is a different path. Always validate filter strings in Outlook before scaling up and prefer explicit date formats for safety.

Applying filters reduces processing time and keeps your RPA focused on relevant messages. Do it once properly and the robot will stop mistaking newsletters for mission critical emails. You will sleep better and the audit log will look less chaotic.

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.