Magento 2 get all orders

Good morning everyone, I’m making a request in the Magento 2 integration. I’m using an edit fields raw to identify the current day so that I can always fetch data only from the previous day.

I have a script build filter to filter the orders from the entire previous day and then a get many orders from Magento.

However, the problem I’m facing is that if I don’t use return all, it limits the results to 10 (and it doesn’t let me set a higher number). But if I enable return all, it takes about 30 minutes to execute and then returns an error.

I checked in the Magento dashboard, and we had 120 orders on the previous day, so it shouldn’t take 30 minutes…

Is there an easier way to query only the previous day’s orders? Maybe by filtering directly in the get many orders instead of using the script, so it only fetches data from the previous day?

Hi bud,

Firstly, your first screenshot was exactely what I was looking for regards Date Range Filter so thanks.

Mine runs a bit long too for 2400 orders. Do you ever get this error

image

Good morning.
I managed to do what I wanted. Regarding the error with the orders, I don’t remember exactly what the message said, but before applying the filters it was loading for a few minutes and then failed because of the quantity — I think that was it.
What I did was filter everything in the “Get Orders” node and change the limit in the expression, which allows it to go above 10.


right now is 20 but i´ve done 1000 before and it worked quite quickly.


Unfortunately for what I wanted i couldn’t filter any more in the magento order so i had to do a if node AFTER the get order. But its working fine

cheers.

So basically what I am doing is pulling all the orders from magento into a n8n Data table and then transform the data and then pull it into Microsoft Business Central.

found this node.. works as expected.