Really bad title of the post but I don't know how else to explain it
I have been using variables in the URL field of my HTTP Request nodes for months without issue, but today I tried something new.
I am pulling a PDF from an API, and returning the result as a binary buffer for further processing.
If I write the full URL to the file in the URL field, I get the correct binary buffer back.
But if I substitute the last part of the URL with a variable, I get the wrong buffer back and the file becomes corrupt when saving it.
Example of full URL: https://example.com/files/invoice.pdf
Example of URL with variable: https://example.com/files/{{filename}}
Not enough info to say for sure, I would suspect the msg.filename has more than just invoice.pdf in it. Show us a debug of message going into http request node.