Cannot count the outlook mails using the count although there are emails in outlook inbox

I use this activity “Get Outlook Mail Messages” and there are my properties set up.
I put Account as blank because is it the same account that I’m using on my Studio.
I set MailFolder as “Inbox”, Filter as “[Subject] = ‘Course Invoices’”, checked both MarkAsRead and OnlyUnreadMessages, OrderByDate as NewestFirst, Top as 30, Messages as CourseEmails.

Then the activity “Get Outlook Mail Messages” is linked to another activity “Log Message”. I set up Log Level as Info and Message as CourseEmails.Count.ToString + " mail messages have been retrieved."

There are emails with the subject “Course Invoices” in my outlook email but when I run the project, the count of email comes out as 0.

Please assist.

1 Like

Hi @Sein_Lai_Hnin

Have a look on the thread

Regards
Gokul

@Gokul001 tried without ticking the OnlyUnreadMessages. Still showing 0 count.

Hi @Sein_Lai_Hnin

In the Properties of Get Outlook MailMessage → Options → Remove the Filter expression and check it

Regards
Gokul

@Gokul001 Still cannot. Is it because of this Account set up? I leave it blank because I want to count the number of mails from this outlook mail “seinrpa@outlook.com” and I am current using Studio debugging using the account “seinrpa@outlook.com”.

Hi @Sein_Lai_Hnin

I don’t this so we need to give an Account

In my environment its working

Regards
Gokul

Have you logged into the Outlook App

I think you are using it in the Online Outlook, So switch to configure the Outlook App in you PC and try it

Regards
Gokul

1 Like

@Gokul001 I logged in to the outlook app. It works now. Thank you so much.

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