Need to parse out a parameter in a url

Hey, this is probably a simple question, but I’m tired and have been looking at this for too long. There has to be a simple way to do this. I have a url as an output from one step, which is an input for another. It looks something like this:

[
{
“next_url”: “https://some.website.com/whatyouwant?cursor=YXA9MSZhcz0mbGltaXQ9MSZvcmRlcj1kZXNjJnNvcnQ9ZXhfZGl2aWRlbmRfZGF0ZQ
}
]

Now, I can’t just sent next_url to the HTTP Request node, I need to break up the url from the parameter cursor.

How do I do that so I can make the next call?

Information on your n8n setup

  • **n8n version: 1.95.3 **
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via npm:
  • Operating system: Ubuntu 24.04

A little more info. I make a call with a HTTP Request node. It returns json that looks like this:

[
{
“results”: [
{
“cash_amount”: 0.241269,
“currency”: “USD”,
“date”: “2025-02-28”,
“id”: “Eb7ef3eec8c59b3826660fd5091faf897bdaad462c9fdeaf498bcf759b433b1b2”
},
{
“cash_amount”: 0.201504,
“currency”: “USD”,
“date”: “2025-03-07”,
“id”: “Ead45d8addd9d122514e7b952f041d3dfc7bb85594a2a2821176416b8fe33ddcd”
}
],
“status”: “OK”,
“request_id”: “47e1d06dd1f8bee192e7989cba51b10d”,
“next_url”: “https://some.website.com/whatyouwant?cursor=YXA9MSZhcz0mbGltaXQ9MSZvcmRlcj1kZXNjJnNvcnQ9ZXhfZGl2aWRlbmRfZGF0ZQ”
}
]

I parse that with a split for results, then send that to a sort. I then split in a different node the next_url so that I can pull the next record, but if I try to send it to an HTTP Request node it fails becuae I have the url and the parameter in one line. I need to break out the cursor.

If I understand correctly, you could send the next_url through a Code node and cut off the unnecessary part before sending it to the HTTP Request (or you can do it in the HTTP Request node with an expression.

Interesting. That should work. I was just assuming I was missing something.

Thank you.