Example code to use ChatGPT to migrate articles from HTML to Contentful
To use this example, you'll need:
- A contentful account
- An openAI account
- Node.js version 16 or above.
npm install
Need to configure .env
file to be like this:
OPENAI_API_KEY=YOUR-OWN-OPENAI-TOKEN
CONTENTFUL_MANAGEMENT_TOKEN=YOUR-OWN-CMA-TOKEN
CONTENTFUL_SPACE_ID=YOUR-OWN-SPACE-ID
CONTENTFUL_ENVIRONMENT_ID=YOUR-OWN-SPACE
Next run:
npm start