# Condition while checking email's attachments

**URL:** <https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127>\
**Category:** Help\
**Tags:** mail, activities\
**Created:** [March 21, 2019, 2:16pm UTC](https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127 "2019-03-21T14:16:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![niteckam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/niteckam/32/19109_2.png) [@niteckam](https://forum.uipath.com/u/niteckam)\
**Post date:** [March 21, 2019, 2:16pm UTC](https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127/1 "2019-03-21T14:16:03Z")

</div>

Hello,  
Im checking each e-mail on my Inbox  
If I have one attachment in PDF format then I process the message.

My question is how to build the assumption:

- IF ‘email contains one attachment in pdf format’ is true

It is not enough to write only assumption

- IF ‘email contains one attachment’ is true  
as in many situation there are some pictures in email which are treat as attachments

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [March 21, 2019, 2:22pm UTC](https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127/2 "2019-03-21T14:22:54Z")

</div>

@niteckam,

1. use Get Outlook mail message to read mails from outlook and will give you output as List (MailMessge ).

2. then itreate using for each activity

---

<div class="post-metadata">

**Author:** ![niteckam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/niteckam/32/19109_2.png) [@niteckam](https://forum.uipath.com/u/niteckam)\
**Post date:** [March 21, 2019, 2:29pm UTC](https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127/3 "2019-03-21T14:29:19Z")

</div>

Hi @lakshman

I want to filter from For Each email stage  
and then work only on those emails which contains 1PDF attachment

THX

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [March 21, 2019, 3:57pm UTC](https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127/4 "2019-03-21T15:57:40Z")

</div>

@niteckam,

Try below steps:

1. Use Get Outlook mail message to read mails from outlook and will give you output as List (MailMessge ).

2. Then iterate it using for each activity

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [March 24, 2019, 3:57pm UTC](https://forum.uipath.com/t/condition-while-checking-emails-attachments/104127/5 "2019-03-24T15:57:43Z")

</div>

Closed on March 24, 2019, 3:57pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
