HTTP Pagination Looping

Hey there - I’m currently struggling with making this pagination automation work

Here’s an image of the full automation.

To give context - here’s what this does:

  1. Fetch a webhook
  2. Get Leads from a specific category (There’s a limit of 50 leads)
  3. Get the array of leads
  4. If the array of leads is greater than 50 go to the pagination part, otherwise output result
  5. Get array of leads + page ID
  6. Set Array length to 50 (Limit) → RUN scope
  7. Set Page ID to current page ID → RUN scope
  8. Generate 10 numbers for looping
  9. Loop over everything
  10. Get Page ID → RUN scope
  11. Get Lead Number → RUN scope
  12. HTTP Request (Paginated Request)
  13. Get Page ID & Lead Number
  14. Add Leads
  15. Set Leads to new number → RUN scope
  16. Set Page ID to new number → RUN scope
  17. If lead length is < 50 → Return response, otherwise run the loop again

In the current system it seems like the Page ID & Lead Number don’t update.

How can I update those ?

Thanks for the help in advance!