Creating a list from array with selected fields only

Describe the problem/error/question

I need a tool for my AI Agent that is able to fetch all the workspace members from Attio. The response returns a list including many unnecessary fields for the use case. I don’t know how to transform this and return a list to the Agent that only contains workspace member name and ID. For now I’m passing the whole response payload, but this elevates my tokens usage significantly.

Please share your workflow

Share the output returned by the last node

Expected output is a JSON object with workspace member’s name and email.

Information on your n8n setup

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

Hey @supbarty , use Edit Fields (Set) node in between Parse array and Create list. This node allows you to pick the properties you need leaving out the rest.

Depending on the incoming data structure you also might need to reconfigure Parse array. Currently you include “Selected Other Fields”. Perhaps you need “No other fields” instead if all the fields you need are already available in the list named data which you use to split out?

Here’s a little demo for better visibility how that works.

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