Community Articles Importing Data from Contentful to Cosmic JS

Importing Data from Contentful to Cosmic JS

Using the Cosmic JS Contentful Importer to transfer your data from Contentful is extremely easy and only takes a few minutes! For a walkthrough of how I built the Contentful Importer check out my other article, Creating the Cosmic JS Contentful Importer.

First head to Contentful Importer Extension and click the "Select Extension" button:


From there select the bucket you would like to add the extension to. 

After selecting the bucket you will see the Contentful Importer extension in the left sidebar:


Now to export your data from Contentful! The first thing you'll need to do is export data using the contentful-cli. Contentful has a full walkthrough on installing the CLI here and here, and a walkthrough on exporting your data here

To install the contentful cli you can use homebrew, NPM or yarn:

# homebrew
brew install contentful-cli

# npm
npm install -g contentful-cli

#yarn
yarn global add contentful-cli


Next you'll need to authenticate the CLI app with your account:

$ contentful login


After opening your browser you'll be prompted to login to Contentful then you'll be provided with a token:


Finally, copy the token and paste it into the contentful login prompt in your console. 


Now you can generate the Contentful export: 

$ contentful space export --space-id=[Your space ID] 


The export tool will run and produce a JSON file. 


Go back to your space and upload the JSON file in the Contentful Importer extension page and click "Run import":


Congratulations! You've successfully migrated your data from Contentful to Cosmic JS!

Was this article helpful?

Thank you! Your input helps us improve our articles and resources. If you have any other questions or comments, please contact support.

You may also like


In this tutorial, I’m going to give you an overview of Mux Extension, talk about the benefits of adding Mux to your Cosmic Bucket and show you how to install it to your Bucket in a few clicks.
In this article I’m going demonstrate how to publish new Objects containing survey responses in Cosmic JS as they are completed in Typeform. Click here to connect Typeform to Cosmic JS using Zapier.
In addition to Import / Export Features and Revision History, Cosmic JS has added Automatic Bucket Backups to deliver even more peace of mind to you and your content editing team. To add daily Backups to your Buckets go to Your Bucket Dashboard > Settings > Backups.
In this article I’m going demonstrate how to add new form submissions to Hubspot when you Publish Objects in your Cosmic JS Bucket.
Step by step guide to build a professional developer's portfolio using React, Cosmic JS, and Semantic-UI
Salesforce is the world’s leading enterprise CRM application. Zapier gives people internet superpowers by allowing them to connect and automate the apps they use. Using Zapier to connect your Cosmic-powered content with Salesforce is easy and requires zero coding.

Ready to Get Started?

No payment info required.
Start Now   Contact Sales