We're trying to search Office 365 emails from last week. The below query works in OWA, but gives an error in Flow.
(received:"last week")
status: 400
Syntax error: character '"' is not valid at position 22 in '"(received:'"last week"')
Solved! Go to Solution.
Hi @kylep ,
It seems you want to get the emils which are received last week.
I have made a test with the received:last week in the Search Query field.
However the output is [].
Return the day of the week from a timestamp.
The expression in 'Filter array' is to get the last sunday:
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The syntax for Flow is different. In your Search Query of your O365 Get Emails Action use this instead: received:last week
See the attached screenshot for reference. That should return emails received last week.
@aprildunnam Thanks for the reply, but that didn't work. It's runs successfully but doesn't pull any data without the quotes. Below is the full search query.
(received:"last week")AND(from:email@domain.com)
Hi @kylep ,
It seems you want to get the emils which are received last week.
I have made a test with the received:last week in the Search Query field.
However the output is [].
Return the day of the week from a timestamp.
The expression in 'Filter array' is to get the last sunday:
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Kylep,
Quotes are special characters so they must be escaped to be included as part of the query text. Please modify your Search filter text as follows
received:\"last week\"
I have found that for text lookups, the match is literal from the start of the text. It is not like in outlook that you can type a string and it will find all text that includes the string. For example in outlook client, if you type subject:val, it will find messages with value, valid, evaluated, oval in the subject. If you use the same criteria in flow, it will only match the word val.
Pd, and drop the parenthesis
Cheers
Fernando
User | Count |
---|---|
67 | |
52 | |
48 | |
29 | |
19 |
User | Count |
---|---|
26 | |
23 | |
23 | |
23 | |
23 |