Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP node Max Pages expression ignored #9597

Closed
NilsW86 opened this issue Jun 3, 2024 · 6 comments · Fixed by #10192
Closed

HTTP node Max Pages expression ignored #9597

NilsW86 opened this issue Jun 3, 2024 · 6 comments · Fixed by #10192
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@NilsW86
Copy link

NilsW86 commented Jun 3, 2024

Bug Description

When using a JS expression in the "Max Pages" parameter (in Pagination/Limit Pages Fetched) in a HTTP Request node the limit is ignored. Any expression including {{ 2 }} can be used and it is still ignored so it is not due to the data not being available. Others have been experiencing the same thing:
https://community.n8n.io/t/need-some-help-with-http-request-node-pagination-using-max-pages-expression/39449

To Reproduce

  • Add a HTTP Request node
  • Connect to any API with pagination
  • Add option/pagination
  • Activate Limit Pages Fetched
  • Change Max Pages to expression and input {{ 2 }} or any other value to test
  • Test the step
  • The limit will be ignored and all pages will be fetched

Expected behavior

The expected behavior would be that an expression with {{ 2 }} would limit the pages fetched like a Fixed 2 would.

Operating System

n8n cloud

n8n Version

1.42.1

Node.js Version

The one n8n cloud is using

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Jun 3, 2024

Hey @NilsW86,

Thanks for the report I have managed to reproduce this and have created NODE-1387 as the internal ticket to get this resolved.

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Jun 3, 2024
@elsmr
Copy link
Member

elsmr commented Jul 25, 2024

Hi @NilsW86 this has been fixed in the linked PR and will be released next week!

@elsmr elsmr closed this as completed Jul 25, 2024
@NilsW86
Copy link
Author

NilsW86 commented Jul 25, 2024

Hi @NilsW86 this has been fixed in the linked PR and will be released next week!

Thanks!

@janober
Copy link
Member

janober commented Jul 31, 2024

Fix got released with n8n@1.53.0

@NilsEle
Copy link

NilsEle commented Aug 24, 2024

Hi @Joffcom @elsmr and @janober ,

I think the bug is still present although slightly different. I am now on the cloud version 1.55.3. I have this test case:
image

This data is pinned to the manual node:
[
{
"filter": {
"country": "xyz",
"categories": [
"x",
"y"
],
"contactLimit": 2,
"pageLimit": 3
}
}
]

My HTTP node works great when using "Max pages" as "Fixed" and input 3. It also works with a expression of {{ 3 }} (which is did not use to). However, it does not work with the expression {{ $json.filter.pageLimit }}. I am 100% sure that the data is available, I can even see that n8n can identify it:
image

But when executing with {{ $json.filter.pageLimit }} instead of {{ 3 }}, I get an error. It says "No execution data available" even though it is:
image

Meaning that it can still not handle a proper input parameter. I have also tried adding a set node before with a different parameter, not working either. Can you confirm that you can reproduce or so you need more information?

Thanks!

@janober
Copy link
Member

janober commented Sep 25, 2024

Fix got released with n8n@1.61.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants