It looks like your topic is missing some important information. Could you provide the following if applicable.
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Split Out expects to have a static name of the field to extract (in the most common use case), not data stored in the field (which happens when you refer the field in the expression like in the example provided by you). Besides, Split Out is not designed to parse the string provided as an input and infer anything from it. String parsing is something you need to do on your own.
What happens here is that Split Out tries to interpret the content of output
property as a comma-separated list of field names to extract from the input object it received.
So, what you will want instead is to assign Fields To Split Out a string (Fixed) value of output
. But you will need to parse the content of $json.output
before that and create an object structured in a way that Google Sheets node would be able to consume.
Here is a quick solution to parse the output from AI Agent node.
Add Code node after AI Agent, set Mode to “Run once for Each Item”, and insert the following code.
return {
output: $json.output.split(/\n ?\n/) // split into entries (rows)
.map(row => ({ // extract address and price
"Full Address": row?.match(/Address: (.*)?\n/)?.[1].trim() ?? "Failed to extract address",
"Asking price": row?.match(/Price: (.*)?\n?/)?.[1].trim() ?? "Failed to extract price",
}))
}
Note how output gets transformed.
Next, insert Split Out node following the example below.
The output should be consumable by Google Sheets / Append row node.
Please mark this post as a solution if it worked for you.
Hey Olek thanks for your help, it’s still not working, the data is also not correctly extracted.
thank you in advance
In the video, the Google Sheets node doesn’t use output from the Code node but instead refers to $fromAI
. This is a valid approach but in different setup. Try dragging column names (Full Address
and Asking price
from INPUT panel onto the fields in Values to Send section in Google Sheets node configuration (replace whatever is in there). To keep whatever you have intact, connect a new Google Sheets node to the Code node, configure it using outputs from the Code node, and see if it works.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.