Notion Integration [GOT CREATED]

If you have n8n setup to save past successful executions it should work fine. A second trigger node will not cause any problems. Do the executions show up in the list if the Cron Trigger node does start it?

How do you run n8n? Is it set up with own subdomain or tunnel or do you run it locally or in the cloud via IP address?

Yes, the Cron triggers show up in the list. I am running it on a Raspberry PI using a tunnel.

I just tried again. The first two pages I created triggered the workflow. The next five, however, did not. Then it worked again twice. :confused:

Hey @RicardoE105

I just seeked this discussion again, because I just had the same problem again (I don’t think I ever touched my former workflow regarding removing the condition whether or not to add the link). However, now I did try to remove the condition and couldn’t make Notion accept an item with an empty link (neither undefined nor–as expected by the code–with "").

Moreover, since I now have two optional parameters, I’d have to add four IF nodes to get it right. Is there any other method to make the Notion node ignore any parameter with undefined value?

It works fine for me.

Hi @baflo

Not sure if this is helpful, but I’m parsing emails into Notion. Sometimes a field might be empty, based on the email. In order to stop Notion from throwing an error on an undefined value, I added the following code to each of the expression fields:

? $json[“project”] :”NA"

so, for instance:

{{$json[“project”]? $json[“project”] :"NA”}}

Now, when the workflow runs, if any of the fields are empty, “NA” is inserted, silencing Notion.

Hope this helps!

David

@terpsfreak @RicardoE105 Thank you all, but it seems I described my problem incorrectly in the first place. I just took some time and figured out you were writing links in text properties, while I tried to add a link to a url property. This was not yet addressed in the Notion node.

I created a Pull Request which addresses this problem and allows to ignore url properties if they are empty: Allows to ignore Notion URL properties if empty by baflo · Pull Request #3564 · n8n-io/n8n · GitHub

2 Likes

@RicardoE105 Can I help somehow so my changes can be merged?

Hey @baflo,

I have just checked out internal ticket system and it looks like your PR was imported into the system for review yesterday and is currently being reviewed. If there is anything that needs doing we will either update the PR or drop an update on Github for you.

Got released with [email protected]

Currently it’s not possible to move the order of the Blocks. Is this planned to be implemented?


Makes updating (big) pages quite elaborate. (Edit3: Workaround: copy node into clipboard and edit the JSON by Hand. Paste after editing and done.)
Is there a public road map what is planned next for this node?

Edit:
Also got an error:

{"message":"400 - {\"object\":\"error\",\"status\":400,\"code\":\"validation_error\",\"message\":\"This version of the API does not support this type of block type. Please upgrade your API version.\"}","name":"Error","stack":"Error: Request failed with status code 400\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:539:35)\n    at endReadableNT (node:internal/streams/readable:1345:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"}

Edit 2:
Reason for the error is that a null reference was passed. So for {{ $json["XXX"] }} there was no data. Changing it to {{ $json["XXX"] ?? "" }} helped.

@maysi I am currently working on redesigning the Slack node. One idea is we’re considering is:

  1. “Blocks” is just a text input (or multi-line textarea)
  2. You go to Slack’s visual blocks editor: Slack (there would be a link inside the node to this page)
  3. You design your blocks in Slack’s editor, and copy the JSON it outputs into the “Blocks” parameter in Slack node
  4. You use expressions within that JSON snippet to swap out static text for variable data

Seems like Slack has a comprehensive UI for block building, so wondering if you would simply find it more intuitive to do the “Work” in there and then just rig up expressions in n8n

I’m a bit confused, as this topic is about Notion not Slack :slight_smile:

Ooops, sorry @maysi I can see how you’d be confused. My fault, I got my tabs mixed up :slight_smile: