Mapping Data Error on Notion Integration using N8N

Hi Everyone,

I hope you are all doing well,

I would like to seek your assistance my integration build are encountering some errors, while populating data to the my Notion Database, kindly see my loom video, for your review, and reference,

I am hoping for your utmost response and feedback to solve this issue.

Issues with Mapping Data in Notion Integration - Watch Video

Best,

Ana

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:

Hi N8N Team,

please details below;

n8n version: Running version [email protected]
Database (default: SQLite): Supabase, and Render
n8n EXECUTIONS_PROCESS setting (default: own, main): Own
Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
Operating system: Chrome Browser, Windows

Hoping for your assistance

Thank you,

Ana

The issue you are having is the notion API doesn’t support undefined values. Undefined is essentially like null, it is saying there is no value that exists for it.

The easiest way to fix this would be to add a default parameter like an empty string (“”).

You can do that in the field with some simple javascript. Whenever a value might be undefined add this expression {{ $possibly_undefined_value ? $possibly_undefined_value : ""}}
Replace $possibly_undefined_value with the actual json key.

If that doesn’t work then please attach your workflow as shown here so we can look at it closer. Videos are not a great way for us to get information

1 Like

Hi Liam,

I would like to clarify, so you mean like this, I will input this on the expression section would be like, {{ $possibly_undefined_value ? $possibly_undefined_value : “$jason.title”}}

please let me know if this is correct, and I will take a test,

Thank you so much,

Ana

Hi Liam,

I applied it but the address column is empty no info, for the other cells that have information, please see the screenshot,


replace {{ $possibly_undefined _value ? $json.address : "" }} with {{ $json.address ? $json.address : "" }} and let me know if that works.

You need to replace both of the $possibly_undefined _value with the $json.address. The first one checks if it is undefined and the 2nd one sets the value

1 Like

Hi Liam, attached here is my workflow,

Change the “Text” value to be {{ $json.address ? $json.address : "" }}.

2 Likes

Hi Liam, thank you so much, You are a Pro! wow it works like a breeze! thank you so much,

You’re welcome!

1 Like

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