Keep only set/Pinned data does not function as intended

Describe the issue/error/question

I am trying to trim the output of the previous nodes to just one variable as I need and send that off through a http request, otherwise I am sending 8 http requests instead of 1.

What is the error message (if any)?

The intended behavior would be either only select the Keep only set in the Set node and declare my needed variable, or pin that variable. However when I do either of these, while I achieve a single variable, the actual output is still 8 items, as shown in the image, so I am sending 8 http request once again in the next node instead of one. Upon checking you can see that the json output has 7 empty braces, of course deleting those changes nothing.

Intended workflow:

I want to trim out all output items and leave only one, not only one variable, but 1 item and no empty ones as currently is happening. Don’t mind the output, I edited it, but the important part is that there are 1 or 2 variables, though the output item just sits at 8, as originally received from the previous node.

Hi @nmt, I am not sure I fully understand your question to I am afraid.

On a general level, if the data pinning feature doesn’t work the way you want it to, you can always use a Function node to mock the exact data you’d like to see (and connect it/disconnect it as needed).

For example, to always return the data from your screenshot you could do something like this:

To only return the first of many items, you can use the Item Lists’ node Limit operation:

Hope this helps!

1 Like

Hey @MutedJam! Thank you for the quick reply!

Yes, the function can help out resolving this, but I am still confused why does pinning/keep only set removes the outputs, but not the actual output items.

If you see my image, on the left there are 8 incoming responses making 8 items in total, on the right I have 2 output responses, but still 8 items. As said before, even editing the json response file does not help.