Utterly confused about how to bind the output of FunctionItem to the body of an HTTP Request

This strikes me as something that’s common and flexible, yet I cannot find anything that intelligently explains how to do this. Is this even possible?

You can do it using expressions. Can you share an example of the body you want to send so that I can put together an example workflow?

My dev environment is on another machine, so it’s hard to move between the two.

I’m looking at this video (n8n Nodemation basic - transforming json (3/3) (Tutorial) - YouTube) and it shows the body expression of an HTTP Request having an “Input Data” under the “Current Node”

My HTTP Request doesn’t have that. It just has “Parameters”

Plus why does the Body parameter even need a name if I’m just sending the entire JSON as a string?

The tutorial video of these two nodes has no relationship to the current version of N8N at all.

Here’s the workflow that creates this outcome:

You do not need to provide a key if you set JSON/RAW Parameters to true

image

Check the example below. I assumed that you want to send the output of the function item node as it’s.

Thanks, but this doesn’t work for me either. I also have the N8N_LOG_LEVEL set to debug and I cannot see any JSON or data in the logs to suggest my data is being sent out via the HTTP Request Axios call.

I’ve decided the HTTP Request has heavy options and the expression builder is kinda poorly documented, so I just made a Function node with the HTTP request helper and found exactly the reason for the problem I was having.

Please spend time creating meaningful tutorials regarding the expression builder. On its surface, it is clunky and unwieldy and can use some smooth guidance to ease people into how to solve problems with it. Other than that, great product here!

2 Likes

Good to hear that you found a solution.

Improvements to the expression editor are in our roadmap.

2 Likes

To add one potentially relevant bit here (because I also got tripped up on this)…

In your example, from this post, you will need to execute the FunctionItem node before the result will populate for use in the HTTP Request node.

That frustrated me for a bit until I just clicked the execute button in the FI node, then went back to the HTTP request and realized it was there. One of those stupidly simple things that didn’t quite make its way into the documentation…

EP