Importing entries to Contentful richText programatically

Hello I am trying to do something very simple that would take many hours of manual work.
I am trying to upload hundreds of files of content to Contentful!

The data is currently in markdown, i am wondering if there is a way to migrate this files to entries with RichText.

I have tried with the Contentful migrate tool but this looks like only creates the content type and the fields for it… and with the Content management API, seems like it needs a special form of JSON for Contentful ? how could i convert this markdown files into this contentful json format? or is there a better way of achieving this ?

Would really appreciate the help!

We do this a lot in our pipeline. For this purpose, the migration API is not the best fit. Here i would use Content Management API (CMA). Here you just form the JSON in whichever way you need to, and then use createEntry to finalize your creation. There’s a bit of trial and error getting the format of the JSON right, but if you have a lot of data to import, it will be worth the time investment.