Need to split output text from a node

Hi there, I am new to n8n and also automation in general, so I apologize upfront if I have created a duplicate issue here.

Describe the issue/error/question

I have output data from a node that provides the response as follows:

Name of the customer: John Doe (or just John, in some cases), Place of origin: Chennai, Age: 25.

I now need to transfer this information to the Google Sheet that I maintain. The sheet already has separate columns for ‘Name’, ‘Place’, and ‘Age’.

But, when I integrate it, the entire response is pasted in the first column like “Name of the customer: John Doe (or just John, in some cases), Place of origin: Chennai, Age: 25.”

How can I split this up into individual values and paste them into the correct columns in that row?

What is the error message (if any)?

I did try the response provided in this thread, but I am not able to match the regex values properly.

Share the output returned by the last node

The output returned by the last node:

Required Output:
image

Information on your n8n setup

  • n8n version: 0.221.2
  • Database you’re using: Postgres
  • Running n8n with the execution process:own
  • Running n8n via: Docker

HI @Jayavel

Welcome to the community!

Created an example for you. Split them out to make it more clear what is going on, but the expression could be combined if needed:

Of course you still need to add it to google sheet and get the data from somewhere but that should be easy enough. :slight_smile:

1 Like

Hey @BramKn,

Thank you for your quick response. I was able to get this working successfully.

The data is getting split accordingly.

Thanks and Regards,
Jayavel S

2 Likes

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