gopai
(Gopai)
November 22, 2022, 6:41am
1
Hello All,
I am using Microsoft o365 activities - Get Mail inside Microsoft Office 365 scope.
It helps me retrieve all messages.
However, I need to retrieve only those emails which have an .xlsx attachment and has ‘Peer review’ in the Subject.
Subject can be: Peer Review test, Peer review automation request etc.
But ‘Peer review’ will always be there.
I used this "“subject eq ‘Peer Review’” - but it does not work for subjects containing other words apart from Peer review - Also, need to use the attachment filter.
Any advice would be appreciated on how to achieve both.
Thank you,
Gopal Pai
Anil_G
(Anil G)
November 22, 2022, 8:54am
2
Hi @gopai
Use ‘has’ instead of ‘eq’ and that should solve the subject part.
Or you can also use contains(subject,’Peer Review’)
For attachments use - hasAttachments eq true
Cheers
gopai
(Gopai)
November 22, 2022, 9:18am
3
contains(subject,“Peer Review”) And has attachments eq True
This is giving me a syntax error. Any thoughts?
Anil_G
(Anil G)
November 22, 2022, 9:19am
4
Anil_G:
hasAttachments eq true
Hi @gopai
It will because correct syntax is ‘hasAttachments eq true’ (no space between and these are case sensitive) use this exactly
cheers
1 Like
Anil_G
(Anil G)
November 22, 2022, 10:01am
5
Hi @gopai
Is your issue resolved? If yes can you mark solution and close so that other can get help. Else happy to help
cheers
gopai
(Gopai)
November 22, 2022, 10:22am
6
Not working, unfortunately.
Anil_G
(Anil G)
November 22, 2022, 10:25am
7
Hi @gopai
place it between inverted comma please. query supports only strings
“hasAttachments eq true”
cheers
gopai
(Gopai)
November 22, 2022, 12:01pm
8
Anil_G:
“hasAttachments eq true”
Hey Anil,
thank you so much!!
“hasAttachments eq true” works as expected.
How do I club it with my subject condition?
My subject line should have the 2 words peer review.
Thank you!
Anil_G
(Anil G)
November 22, 2022, 12:09pm
9
HI @gopai
use ‘and’ in between to club both
“subject has ‘ABC’ and hasAttachments eq true”
Or
“contains(subject,‘ABC’) and hasAttachments eq true”
cheers
gopai
(Gopai)
November 22, 2022, 1:39pm
10
I weote this - It gave me Bad response.
Anil_G
(Anil G)
November 23, 2022, 3:35am
11
Hi @gopai
Please try it like this
“contains(subject,’Peer Review’) and (hasAttachments eq true)
If this doesnot work try interchanging the order or after getting emails we can loop and check hasattachments property separately as well
Cheers
gopai
(Gopai)
November 24, 2022, 7:20am
12
Thanks a lot Anil - I just used the Attachment filter and then checked the subject line condition in a for loop.
Appreciate your help-
1 Like
Anil_G
(Anil G)
November 24, 2022, 8:33am
13
Hi @gopai
Happy to know you solved your issue… could tou please mark the solution so that other can get help as well
Cheers
system
(system)
Closed
November 27, 2022, 8:33am
14
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.