Notion return only the first relationship item

Voici le template mis à jour avec “Chrysostome” remplacé par “Chris” :


Describe the problem/error/question

I’m using n8n to retrieve tasks from a Notion database (Tasks Tracker) that has a property Assigned to which links to multiple people.
In Notion UI, I can see two users assigned to a task (e.g. “Hackathon 42”), but in the n8n API response, I only get one ID under the relation array.

I have already:

  • Disabled Simplify in the Notion node
  • Switched to using the Get operation on a single page by URL
  • Confirmed that the property is of type "relation" (not people)
  • Shared the Notion database used by Assigned to with my integration

Still, the Notion API only returns the first linked user, not the full list.


What is the error message (if any)?

No error message.
But the output of the "Assigned to" relation is incomplete:

"Assigned to": {
  "type": "relation",
  "relation": [
    {
      "id": "1d78a806-8674-807a-a015-e8743f5cc98d"
    }
  ],
  "has_more": false
}

Whereas in the Notion UI, this field shows:

  • Alain
  • Chris

Expected output:

"relation": [
  { "id": "..." },
  { "id": "..." }
]

Please share your workflow


Share the output returned by the last node

"Assigned to": {
  "type": "relation",
  "relation": [
    {
      "id": "1d78a806-8674-807a-a015-e8743f5cc98d"
    }
  ],
  "has_more": false
}

Expected result:

"relation": [
  { "id": "Alain_ID" },
  { "id": "Chris_ID" }
]

Information on your n8n setup

  • n8n version: 1.89.2 (Cloud)
  • Database (default: SQLite): Not applicable (n8n Cloud)
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via: n8n Cloud
  • Operating system: macOS (local), Notion via Ark

Hi @Chrysostome_Beltran

See if this solution makes sense for you

This solution works around the limitations of the native Notion node:

Add an HTTP Request node after your current Notion node
Set up the HTTP Request:
Method: GET
URL: https://api.notion.com/v1/pages/{{$node[“Notion”].json[“id”]}}
Authentication: Bearer Token
Token: [Your Notion integration token]
Headers:
Name: Notion-Version
Value: 2022-06-28

Add a Function node to extract the data correctly:

// Extrai todas as relações do campo "Assigned to"
const response = $input.item;
const properties = response.properties;

// Verifica se o campo "Assigned to" existe e tem relações
if (properties && properties["Assigned to"] && properties["Assigned to"].relation) {
  // Retorna o objeto com todas as relações extraídas
  return {
    json: {
      id: response.id,
      title: properties.Name?.title[0]?.plain_text || "Sem título",
      assignedTo: properties["Assigned to"].relation,
      // Inclua outros campos conforme necessário
    }
  };
}

// Caso não encontre o campo, retorna o item original
return $input.item;

If this suggestion solved your problem, please mark my post as the solution (blue box with checkmark) so that this ongoing discussion does not distract others who want to find the answer to the original question and click the heart. Thanks :+1: