mbe
(Markus Berg)
April 21, 2023, 6:46am
1
Hi folks,
I am facing the challenge to filter the mails I would like to proceed with the O365 avtivity “Get Mail” for mail addresses that conatins certain strings.
The examples that are mentioned in the official documents here
UiPath.MicrosoftOffice365.Activities.Mail.GetMail
just mentioned the full from-address like
“from/emailAddress/address eq ‘someone@company.com’”
But how can I filter/use the query using “contains” for the from-address?
I already achieved to filter the subject with the following query
“contains(subject,‘blablabla’)”
But if I try to apply this to the from-address, it does not work.
Thanks for any advice and help.
Yours
1 Like
Srini84
(Srinivas)
April 21, 2023, 3:42pm
2
@mbe
Can you check as below for contains in From-address
“from:contains(‘blabla’)”
Hope this may help you
Thanks,
Srini
mbe
(Markus Berg)
April 24, 2023, 9:23am
3
Hi @Srini84 ,
thanks for your reply, but this does not works for me. It causes the following error
Get Mail: Code: BadRequest
Message: Invalid filter clause
Inner error:
AdditionalData:
date: 2023-04-24T09:21:46
request-id: d576ff6f-1b5f-4f97-a8d3-f8e2169eddb2
client-request-id: d576ff6f-1b5f-4f97-a8d3-f8e2169eddb2
ClientRequestId: d576ff6f-1b5f-4f97-a8d3-f8e2169eddb2
Any other suggestions?
Yours
Hi
mbe:
already achieved to filter the subject with the following query
“contains(subject,‘blablabla’)”
But if I try to apply this to the from-address, it does not work.
When it comes to Address It is recommended to use only FROM Clause instead of Contains
But for the one partially known u can still use From with wildcard symbols like this
“From:‘*@example.com ’”
Try using like this based on ur condition or value
Cheers @mbe
mbe
(Markus Berg)
April 24, 2023, 12:23pm
5
Hi @Palaniyappan ,
I am really sorru, but this phrase also does not work. The error message stays (nearly) the same
Get Mail: Code: BadRequest
Message: Invalid filter clause
Inner error:
AdditionalData:
date: 2023-04-24T12:19:23
request-id: 029c6ca2-5ec6-4f69-8188-ccc0add791a1
client-request-id: 029c6ca2-5ec6-4f69-8188-ccc0add791a1
ClientRequestId: 029c6ca2-5ec6-4f69-8188-ccc0add791a1
I use this package
with an Studio 2021.10.5
I tried also ‘from’ and ‘From’ as it may be case sensitive, but the error occur with both.
Yours
Hmm this should work ideally
Did u try to type the same on ur own
Because sometimes quotes direction might change on copying
@mbe
mbe
(Markus Berg)
April 24, 2023, 12:58pm
7
Yes, @Palaniyappan I did, as you can see here
But still no improvement.
Hmm
Double quotes looks in different color isn’t it
@mbe
mbe
(Markus Berg)
April 24, 2023, 1:18pm
9
I totally agree with you, and as I retyped it from scratch the colours changed as follows
But still no changes concerning the error message
@Palaniyappan I am really sorry
Hmm
Can we try with this
“contains(from/emailAddress/address, ‘your text’)”
@mbe
1 Like
mbe
(Markus Berg)
April 25, 2023, 5:37am
11
Good morning @Palaniyappan ,
that is now working like a charm
Many thanks for patience, help an assistance
Yours
1 Like
Glad it got resolved @mbe
system
(system)
Closed
April 28, 2023, 5:39am
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.