When using Ai Agent how to get 1 output to separate into 4 outputs

Describe the problem/error/question

"I’m building a Google Task bot where I send a message, and it runs through an AI agent to extract the details. The issue is that the agent returns one single output containing all the information needed for the Google Task node (Title, Due Date, Notes, and Status).

How can I split this single output into four separate outputs so each piece of information goes into the correct field in the Google Task node?

I’m open to other suggestions if there’s a better way to structure this!"

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

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:

You can use a Code node for that.

Copy the JSON from the input and ask ChatGPT to write a JavaScript to be used in n8n.

Another option would be to use Edit Node. And use Expressions to extract the strings you need.

.

:point_right: If my reply answers your question, please remember to mark it as a solution.

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