Notion issues - Undefined data - Bad request

Hello all!

I’m migrating from Zapier to n8n and getting some issues when use Notion nodes.

As I need some information that is not present in the simplified version response, fields are always returned as an array. When the field in Notion is empty, the array don’t exist in the raw data and I get a bad request.

Error message
Bad request - please check your parameters
body failed validation: body.properties.Gerente Predial.rich_text[0].text.content should be defined, instead was undefined.

Information on your n8n setup

  • [email protected]
  • Database: SQLite
  • n8n EXECUTIONS_PROCESS setting: own:
  • Running n8n via cloud
  • Operating system: Windows 11

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:

I have found a workaround to it work ok.

Check if the field array is null, if yes, set the field as empty, if not, set as the content.

{{ $if($json.properties[‘Gerente Predial’].rich_text[0] === undefined,“”,$json.properties[‘Gerente Predial’].rich_text[0].text.content) }}

1 Like

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