I have another problem with the outlook “Get many messages” node.
At first, I wanted to get all emails from one year ago to today. So I used this filter:
ReceivedDateTime ge {{ $now.minus({ years: 1, days: 1 }) }} and isDraft eq false
and checked “Return all”
First problem, I got the error " Query option ‘$filter’ was specified more than once, but it must be specified at most once.":
But then… here is the second problem: it returns older emails first. But in my case, with a limit of 500, it never reaches the end of the list, so the newer emails…
After some search, there is no filter to set the order, it’s another parameter that is not implemented in n8n. The node surely use the url /messages?$filter=ReceivedDateTime... but should use /messages?$orderby=receivedDateTime desc$filter=ReceivedDateTime...
Hi @CodeRider883 I’ve tried the same query, and I’m not getting any errors when trying to execute it with ‘return all’ - what version of n8n are you running? I’m trying this out on 0.233.1:
You could use a HTTP request node instead to have both $filter and $orderby parameters, too, but I’m curious why that expression with “return all” isn’t working for you
Hi, I forgot to say something: it seems to have something to do with the number of returned items.
After some tests, it works until 99 but crash at >= 100 items.
In your exemple, you have 2 items, so it will not trigger the error.
That looks like we might be making a mistake with our pagination code and not removing the query when using the next url provided by the outlook API.
We have created a bug ticket for this internally and I will look into it properly early next week. For now you could possibly use an http request node to manually fetch them which isn’t ideal.
Hi!
I don’t want to bother you, especially as I know you’ve got other priorities, just to see if there’s any chance that the problem will be solved soon?
If not, I’m going to try going straight to the APIs, because my 2 workflows have been at a standstill since the beginning of July…
Hi, I see yesterday that it was live, so I jumped right into my n8n to try and… it works!
Absolutly fantastic, thanks!
Just a note, I just see that there is no Outlook trigger like there is on Gmail, is this planned?