IF Function as Part of Loop

I have created a loop, loosely based on @RicardoE105’s Hubspot workflow at Hubspot node 'get all contacts': only subset of max 300 entries - #36 by Jakob_Tiebel. For the HTTP GET, I need to supply a URL with /contacts?page=1 on first run and then increment by 1 for each subsequent run. I have it working to the point where a Set takes the current page # and increments it by 1, so I have 2 coming into the function that is going to run back into the HTTP GET. I want the function to set the URL as /contacts?page=1 unless Set number value “page” is equal to 2 or higher, in which case it should be /contacts?page=# (# being the value of “page” from the Set). I do have an IF statement in place to stop the loop once the page number equals the max page value provided by the HTTP GET JSON. Hopefully, that makes sense.

@cleveradmin can you share the workflow?

Sure, tomorrow. I have to sanitize it and mock the webhook data.