Skip to main content

Hi community,

I got an error from trying to create a database item in Notion.

 

Here is the error:

body failed validation: body.childrenn9].code.language should be `"abap"`, `"agda"`, `"arduino"`, `"assembly"`, `"bash"`, `"basic"`, `"bnf"`, `"c"`, `"c#"`, `"c++"`, `"clojure"`, `"coffeescript"`, `"coq"`, `"css"`, `"dart"`, `"dhall"`, `"diff"`, `"do...

 

Couldn’t figure out what’s going on - anyone knows what might be wrong?

 

Thank you!

Hi there @OliveiraHero! 👋

Hmm, I’ve not come across that error before. Judging by it’s wording it seems like Notion doesn’t like the language that’s been selected for the code block. From the screenshot you shared it looks like English might have been selected for the language. But looking at Notion’s API documentation on code blocks English isn’t one of the available language types as it’s not a type of code language: https://developers.notion.com/reference/block#code
 

Is it Notion’s Create Database Item action that’s erroring here? Or are you using the API Request (Beta) action to create the new item in Notion? Just want to double-check which one is being used here as it’s possible to add new items through both of those actions!

Looking forward to your reply here!
 


Thanks for the help @SamB ! It’s “create database item” that’s causing the error 


Thanks for confirming that @OliveiraHero!

Hmm, I’ve done some further digging and it looks like we can sometimes see that error if the Content Format doesn’t match what has been supplied in the Content field. 

It looks as though you’re using Markdown in the Content field. Can you confirm whether you’ve got Markdown selected in that Content Format field? If not, can you change the selected format to see if that fixes it?

If you have Markdown format selected already but it’s erroring, then I wonder if there’s a form of markdown that’s being used in the Content field that Notion doesn’t support: Notion Markdown Support

Do you think that could be the case here?