Using the “HTTP Request” node I’m pulling records with ~25 fields. I only want to pull 6 of those fields and write the data to a CSV file. The API I’m pulling does not allow field selections. I’m a n8n noob and am not sure how to build the workflow for this…specifically what nodes to use. Any help is greatly appreciated.
I’m sorry, but I can find no way to pass on the data from just 6 of the properties returned from the HTTP Request node using the Set node. I’ve read the Set node docs and played with with adding various “Values to Set” entries and the only thing the Set node outputs is the values I enter in the “Values to Set” section. Any idea what I’m doing wrong?
Is it possible to share a workflow so I can better understand what you’re trying?
If you use the Set node after your HTTP Request node with the “Keep Only Set” option, you can specify the 6 fields you’d like in the Values to Set. The actual value for these properties should be an expression that maps to the fields from the HTTP Request node.
I still cannot make the Set node output more than 1 record.
I cannot share the workflow due to exposing my clients API endpoint.
However, here is the flow: Start–>HTTP Request which I limit to the top 10 records ($top = 10) -->Set node:
Keep Only Set = true
I set “Values to Set”–>“Name” to PartNumber and “Value”–>“Add Expression” to select one field from “Current Node”–>“Input Data”–>“JSON”–>“0”–>“PartNumber”
If I execute this workflow only 1 PartNumber shows up in the output. I assume the Set node should output all 10 of the records from the left hand side “Input” section?
This was a test with only one field…I need to output six fields from approximately 1,650 records.
I assume I must be doing something wrong. The above describes the workflow. If I need to I guess I could save the workflow without the API endpoint URL?
If you could post the output from your HTTP Request node so we can see the structure of the response, that might help.
I suspect the result of the HTTP Request node may be a single item that contains an array property with 10 items that would first need to be split out before you pass it to the Set node.