Have to write to excel if email has attachment or not


I am able to download attachments from email if there is any attachment. I need to write to excel if the email is has attachment or not.
Eg :- sender name or subject – Has Attachment
Abcdefg. Yes
Hhshsjsj. No
I need to do this task can any one help

Hi @kishore_praveen

Trey like this

I hope it helps!!

Hi @kishore_praveen

Follow these steps:

  1. Use the “Get Outlook Mail Messages” activity to retrieve emails from your Outlook inbox or “Get IMAP Mail Messages” .
  2. Use for each to iterate through the mails
  3. Assign: senderName = item.From.DisplayName
  4. If(“item.Attachments.Any”):
    write excel :SenderName,Yes
    write excel:senderName,No

hi @kishore_praveen

Try the below process

Use the additional filters option and in for each email activity and filter the mails based on subject and sender address


Hi @kishore_praveen

First filter the mails with subject and sender mail address

- Assign -> OutlookMails = OutlookMails.where(function(x) x.Subject.Contains("Give subject here") and x.SenderEmailAddress.Contains("Give the Mail Id here")).ToList

OutlookMails is the output of Get outlook mail message activity.

Use for each loop to iterate the mails in the OutlookMails variable.
Inside loop take a If condition

- If -> OutlookMails.Attachements.Count>0

In then block you can update to the excel by using excel activities.

Check the below workflow for better understanding.

Hope it helps!!