Contentful
The Source Contentful connector allows content to be picked up from Contentful and transformed into motation.
Configuration walkthrough
Specifics
The source Contentful connector is able to sync both content and files (as references).
Entry Ids
Contentful uses a unique id for each entry. When creating and updating entries, Impulse will use the id from the source system. If the id exists, it will update the content, if not it will create it. According to the documentation, the id has to match this regex /^[a-zA-Z0-9-_.]{1,64}$/
. If the id does not match this regex, it will be cleaned and removed all characters that do not match the regex.
Content Status
Contentful has support for 4 status:
Draft: A draft entity is not published
Changed: An updated entity is published but has pending changes
Published: A published entity is published and has not been modified since
Archived: An archived entity is not published and can not be edited
Note: File Assets only support Draft and Published status.
Endpoint Config
When saving an endpoint for a Contentful repository via REST instead of the UI you must use the following key:value pairs in the payload.
contentRepo:contentful
contentRepoVersion:latest
Token
Contentful API requires a token for authentication. This token must be provided in the adapter write config. The easiest option is to create a new "Content management token" for a Contentful user and pass that to Impulse.
Content types
Content types are not synced by Impulse. A content type must already exist to sync content to. Use the content mapper to align the incoming content to the existing content type.
Spaces
Spaces are treated as equivalent to Motation's Domains. New synced domains will become new spaces in Contentful. It's required to specify the Space you want to sync to. For this there is a job option that can be set to determine the specific spaces that content should be synced to.
Environments
Motation does not support environments so new environments will not be synced. By default content will ignore environments.
Locales
Locales are roughly equivalent to Motation's Languages. However, they are not supported yet. It wil use the default locale of the space.
Pickup Date time
Setting a time zone is not supported. You must provide the time for the time zone the system uses.
Supported Fields
Text (Short)
Text (Long)
Number (Integer)
Number (Decimal)
Date and time
Boolean
Media
Reference
JSON Object
Array: Handled as an array of only strings.
Rich text: This field is handled internally by Contentful using a custom hierarchy. What makes this a System Field. What it means is that it will be synced only to Contentful and not other systems.
Unsupported Fields
Location
Unsupported Operations
Syncing Locales.
Creating "folders" in Contentful.
Adapter Properties
Property | Purpose |
---|---|
token | The content management token to use Contentful's API. |
space | The space that should be searched for content and content should be synced to. |
environment | The environment that should be searched for content and content should be synced to. |
rateLimitPerSecond | It is used to control the rate at which certain operations can be executed to prevent excessive usage or abuse of resources (default: 7). |
Job Options
Name | Description | Data Type | Required | Default Value |
---|---|---|---|---|
space | The space that should be searched for content and content should be synced to. | Text | Yes | No Default Value |
environment | The environment that should be searched for content and content should be synced to. | Text | Yes | No Default Value |
contentType | The content type to search for. | Text | Yes | No Default Value |
entry | Entry id will be searched and synced, sync job will only sync this specific entry | Text | No | No Default Value |
dependenciesDepth | The max depth to look for dependencies. Files assets are dependencies. | Integer | No | 1 |
contentDependencies | If dependencies should be picked up. Files assets are dependencies. | Boolean | No | false |
query | Query params to add to the request to find contents to pickup. Follows the standard query params from the contentful doc. | Text | No |
space Job Option
The value of the each space
option should be the ID of the space Impulse should check and sync content to.
environment Job Option
The value of the each environment
option should be the ID of the space Impulse should check and sync content to.
contentType Job Option
The value of the contentType
job option should match the Content Type ID from Contentful for the content type being checked/synced to.
Syncing all media files / assets
Use the following value for the contentType
job option to sync all media files / assets.
Content mapper Example set up
We fill each field with what is followed we can see that Contentful-endpoint is where our destination is and we have content id of restaurant in the source and in our destination we have resturant in addition we have extra properites of field type and to fill those in all you have to do is check our Connector Matrix and select the source and destination and under the Impulse Content Map table we can enable display motation field type and see that the required field are the columns in the middle.
Troubleshooting
Last updated