- install contentful-cli (https://www.contentful.com/developers/docs/tutorials/cli/)
npm install -g contentful-cli
- authenticate
contentful login
- configure
config/import.json
-
npm install (or yarn install)
-
download csv file to inputs/data.csv
-
convert csv to json contentType must be the contentType id
node clearData.js {contentType}
- finally, import data to contentful space
contentful space import --config configs/import.json