Unable to read the attachment in Gsuite ' Get Mail Message' Activity

Hi Team,

I am using ’ Get mail message ’ activity to read the file name of the attachment however getting error as
Below. Already tried with ’ item.attachments(0).Name’

Please help me if you have any other solution to it.

Hello @Suresh_Ghadai
The Error occurred may be there is no attachment in the mail.
Print this in log to get the count of attachments in the mail.

CurrentMail.Attachments.Count.tostring

@Suresh_Ghadai

Before checking the attachments first you need to check if the attachment count is >0 that means it has the attachment

So, place a IF condition inside For Each activity and now you can write as item.attachment.count > 0

Then you can place your logic

Hope this may help you

Thanks,
Srini