Condition while checking email's attachments

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

@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

    If item.attachments.tostring.contains("*.PDF")
    Then continue 
    Else skip
1 Like

Hi @lakshman

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

THX

@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

    If item.Attachments.Where(Function(x) x.Name.Contains(".pdf")).Count = 1
    Then Continue
    Else skip.

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