Contentful Integration
iContentForge seamlessly connects to your Contentful space, allowing you to automatically publish AI-generated articles as entries in your specified content model. This guide walks you through the setup process, from finding your credentials to configuring the field mapping.
Prerequisites
Before you begin, ensure you have:
- An active iContentForge project with articles in the Ready status.
- Editor or Admin access to the target Contentful space and environment.
- Knowledge of the Content Type (model) you wish to publish articles to.
Step 1: Gather Your Contentful Credentials
To connect, iContentForge requires four key pieces of information from your Contentful workspace.
1. Space ID
Your Space ID is a unique identifier for your Contentful project.
- Log in to your Contentful dashboard.
- Navigate to Settings > General Settings.
- Your Space ID is displayed at the top of the page.
Location of Space ID in Contentful General Settings
2. Environment
This is typically master for the primary environment, but you can select any environment you have access to (e.g., staging, production).
3. Content Management API (CMA) Access Token
This token grants iContentForge permission to create and publish entries in your space.
- In Contentful, go to Settings > API keys.
- Click Add API key.
- Select the Content management tokens tab.
- Click Generate personal token.
- Give it a descriptive name (e.g., "iContentForge Auto-Publish").
- Copy the generated token immediately. You will not be able to see it again.
Security Note: Treat your CMA token like a password. Store it securely. In iContentForge, it is encrypted. If the token is compromised, revoke it immediately in Contentful and generate a new one.
4. Content Type ID
This is the API identifier for the content model (e.g., blogPost, article) where your articles will be created.
- In Contentful, go to Content Model.
- Click on the content type you want to use.
- The Content Type ID is listed in the main panel, separate from its display name.
Location of Content Type ID on a Contentful model page
Step 2: Connect in iContentForge
- In your iContentForge project, go to the CMS section.
- Click Add CMS and select Contentful from the list.
- Enter the four credentials you collected in the previous step.
- Click Test Connection. A success message confirms your credentials are valid and iContentForge can access your space.
Step 3: Configure Field Mapping
After a successful connection, you must map the article data from iContentForge to the fields in your Contentful content type. This tells the system where to put the title, body, slug, etc.
- In the connection settings, locate the Field Mapping section.
- You will see a list of standard iContentForge article properties (e.g.,
title,content,slug,excerpt,featuredImageUrl,author,publishDate). - For each property, select the corresponding Field ID from your Contentful content type from the dropdown menu.
iContentForge field mapping interface showing dropdowns for Contentful Field IDs
Mapping Tips:
content: Map this to your main rich-text field (e.g.,body,postBody).slug: Map this to your URL slug field. iContentForge will generate an SEO-friendly slug from the title.featuredImageUrl: Ensure your target field in Contentful accepts a single image. iContentForge will upload the image asset, create an entry, and link it.publishDate: Map this to a date/time field if you want to control the entry's publication date within Contentful.
- Once all desired fields are mapped, click Save Configuration.
How Publishing Works
- Status Flow: An article moves from
readytoqueuedwhen it's next in line for your configured Drip Feed schedule. - Creation: iContentForge uses the CMA token to create a new entry in your specified Contentful space, environment, and content type.
- Asset Handling: If a
featuredImageUrlis mapped and an image is present, iContentForge will create an asset, process it, and link it to the entry. - Publication: The entry is saved and then published via the CMA, making it available through your Contentful Delivery API.
- Final Status: In iContentForge, the article's status updates to
published. The new Contentful entry ID is stored for reference.
Drip Feed Publishing: If enabled, iContentForge will automatically publish ready articles from the queue to your connected CMS approximately every 5 minutes, ensuring a steady, natural flow of content.
Troubleshooting
| Issue | Likely Cause | Solution |
|---|---|---|
| "Test Connection Failed" | Invalid Space ID, Environment, or CMA Token. | Double-check each credential. Ensure the CMA token has not expired or been revoked. |
| "Field Mapping Error" on publish | Mapped Field ID does not exist or is the wrong field type. | Verify the Field IDs in your Contentful content model. Ensure content maps to a rich-text field, for example. |
| Entry created but not published | Insufficient permissions on the CMA token. | When generating the token, ensure it has permissions to publish entries/manage content. |
| Image fails to upload | Asset field constraints or processing timeout. | Check that the target asset field in Contentful accepts the image MIME type (e.g., image/jpeg, image/png). |
Next Steps
- Learn how to manage your publishing queue with Drip Feed Settings.
- Understand the complete Article Generation Workflow.
- Explore other available CMS Integrations.