Cannot figure out: Split Node output to append separate rows in a Google Sheet

Describe the problem/error/question:

New to n8n so probably a bit of a stupid question:

  1. In my workflow, I have an AI agent outputting 10 different content ideas. I have a split node with an upstream Google Sheet node and this is my problem:

My split node output is this:

When I try to map my Google Sheet columns manually, the output is simply what I have mapped instead of the actual columns:

What I want to achieve is for every result, in this case (0, 1) to have a separate row in Google Sheets for every output. I have the columns in the sheet, but when I map, I don’t get the actual values:

If something doesn’t make sense, please let me know, would be happy to clarify.

Thanks a lot for the help in advance.

Please share your workflow

Share the output returned by the last node

1 Like

Hi @Niko_Po

Try this workflow. if it works, disconnect it from the code node and reconnect it to your flow.

:heart:If this response helped you, please click the heart to show that it is useful
:white_check_mark:If this response solved your issue, mark it as the solution to help the community

@Niko_Po

Also, I wanted to let you know that you need to add a system message to your AI Agent. They will not work well at all without one. Here’s an example.

1 Like
Your suggestion works, results are appended to the sheet in separate rows. Just for the community here, if you want the output to be dynamic, you can flatten the array and it all works!

Thanks very much @rbreen!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.