Sitecore Content Hub DAM Connector for Contentful

The Sitecore Content Hub DAM Connector for Contentful integrates Content Hub with Contentful so authors and editors can find, preview, and insert approved assets directly into Contentful fields. It lets you to work with Contentful while keeping assets centralized in Content Hub.

Note

To install and configure the connector, you must either be a superuser or have the necessary permissions granted to you through user group policies. You also need the Admin role for the Contentful organization and space.

To use the connector:

Create the app definition

The app definition defines the metadata that Contentful needs to understand how to handle your app when installing, serving, and running it.

To create the app definition:

  1. Log in to the Contentful web app.

  2. Open the organization or space settings, depending on your permissions.

  3. Click the Apps tab to open the App details page.

  4. On the App details page, click Create app.

    Apps dialog from where you can create an app
  5. Specify the following information:

    • Name - a descriptive name, for example, Sitecore DAM.

    • Icon - an icon to identify the app.

    • Frontend URL - the public URL of the Contentful connector deployed to Cloudflare (https://ch-connector-contentful.sitecorecontenthub.cloud/). To try out versions of the connector not deployed to production, use the public integration URL (https://ch-connector-contentful-staging.sitecore-staging.cloud/) but be sure to add it in the CORSConfiguration in your Content Hub instance. Versions deployed to the integration URL can be unstable.

    Contentful app details dialog where you can define the name, assign an icon, and provide frontend details
  6. In the Locations dialog, select the required locations for your app:

    • App Configuration Screen - where you specify the base URL and page name for Content Hub. By default, the page name is SCAssetConnector.

    • Entry Field - a JSON object that denotes the primary user-facing component where content authors and editors interact with Content Hub assets directly within Contentful fields.

    Leave all other check boxes unselected.

    Locations section where you specify how the app will render
  7. Click Save.

Find the page name

When you configure the app definition, you specify the base URL and the page name. The page name is the page that is rendered in the Contentful portal. By default, it is SCAssetConnector; however you can define your own page name as required.

To find the page name:

  1. On the menu bar, click Manage .

  2. On the Manage page, click Pages.

  3. On the Pages page, in the left pane, select the page you want to work with and then click the Info tab.

    The Name field displays the page name to use when you install the connector.

    Location of the page name to use with the connector

Install the app in a Contentful space

After you create the app definition, install your app to a Contentful space.

To install the app in a Contentful space:

  1. In the Contentful web app, open the space where you want to install the app.

  2. Save the app definition.

  3. From the Actions drop-down list, select Install to space.

    App details dialog where you can install your app
  4. Choose the required space and environment and click Continue.

  5. In the Manage Access dialog, verify that the selected environment is correct and then click Authorize access.

    Manage Access dialog where you authorize access to a space

    Once access is authorized, you’ll be taken to the Sitecore DAM Instance configuration page, where you can configure the ContentHub base URL.

  6. On the Configure Sitecore DAM Instance page, enter the Content Hub base URL and the name of the search page from Content Hub that is to be shown in the connector dialog inside Contentful (by default, SCAssetConnector. If you are not using the default page, enter the name of your own page.

    Configure Sitecore DAM instance dialog from where you install your app
  7. Click Install to selected environment.

  8. Click Save.

Tip

You can also install the app from the Apps tab. On the Apps tab, select Custom apps, open the Actions menu for your app and choose Install. This will take you through the Install to space flow where the Manage access dialog is displayed to review permissions and authorize access.

Assign your app to a content type

The content model defines the types of content you work with. After you install your app, you need to assign it to a content type.

To assign your app to a content type:

  1. On the Content Model tab, select the content type you want (for example, Recipe).

  2. Click Add Field and select JSON object (the connector stores asset data in JSON format).

  3. In the Name field, enter a field name (for example, Media), and click Add and Configure.

    Dialog to add a new JSON object field
  4. On the configuration page, in the Appearance section, select the app. The other settings are not necessary.

    Validation page configuration for the app
  5. Click Confirm.

Validate that the connector works

After you have successfully created and set up your custom app, browse to Content Hub and select assets to verify that the connector is implemented and working correctly.

Dialog where you can select Content Hub assets

To validate that the connector works:

  1. On the Content tab, click Add entry to create an entry with the content type (for example, Recipe). The entry field (Media) appears with the Sitecore Content Hub DAM connector.

  2. Click Select from Content Hub to browse and select assets stored in Content Hub.

    Content tab where you can select the Editor tab and click Select from Content Hub

Do you have some feedback for us?

If you have suggestions for improving this article,