Contentful
Contentful is a content management system (CMS) designed to help you create, manage, and distribute content across various platforms. Unlike traditional CMSs, Contentful is headless, focusing solely on managing content without being tied to a specific front-end presentation layer.
How to Integrate Contentful with ZBrain Flow
To integrate Contentful with ZBrain Flow:
Click the β+β button in ZBrain Flow.
Type "Contentful" in the search bar and select it from the available options.
Choose an action to begin the setup process.
How to Create a Connection with Contentful in ZBrain Flow
To establish a connection between Contentful and ZBrain Flow:
Enter a Connection Name β Provide a name for easy identification.
Enter the Contentful Access Token, Space and Environment.
To get the required credentials, follow these steps:
Access Token:
Content Delivery API: Create API keys in the Contentful web app by navigating to Settings > API Keys in your space and generating a new token.
Content Management API: Use Personal Access Tokens (PATs) for simpler access. These can be created in the Contentful web app under Settings > API Keys.
Space:
A space is like a project container that stores entries, assets, and content types.
Each space has a unique ID and can be accessed via the Contentful APIs.
Environment:
Environments represent different content stages, such as development, staging, and production.
The default environment is usually named "master,β but additional environments can be created for testing.
Click βSaveβ to finalize the setup.
Once connected, ZBrain Flow can interact with Contentful to retrieve, update, delete, and automate content management operations.
Key Terms in Contentful
Content Model
A content model defines the structure of content stored in Contentful. It consists of different fields (such as text, images, numbers, or references) that determine how content is organized. To find a content model:
Go to Contentful Web App β Content Model section.
Select the required model to view its structure and fields.
Locale
Locales define language variations for your content. If your project supports multiple languages, you can choose the specific locale while searching, retrieving, or creating content. To find available locales:
Navigate to Settings β Locales in the Contentful web app.
Entity ID
The entity ID uniquely identifies an entry (content) or an asset (image, file) in Contentful. To get the entity ID:
Open a content entry in Contentful.
The Entry ID is visible in the entry settings or in the URL when viewing an entry.
Actions Available in ZBrain Flow
1. Search Records
Fetches multiple records from Contentful based on specific query parameters, allowing for efficient retrieval of relevant data.
Configuration Steps:
Select an existing connection or create a new one.
Select the Content Model β Choose the structure of content to search within.
Select the Content Locale β Define the language variation for the search.
Enter the Query Formula β Define conditions to search for records.
Enter the Limit β Specify the maximum number of records to return.
Enter Skip β Set the number of records to skip.
Enter the Relationship include Depth β Define how many levels of linked entries and assets to include.
Return Fields β Specify which fields to return for each record.
2. Get Record
Retrieves a single record from Contentful, useful for obtaining detailed information about a specific entry or asset.
Configuration Steps:
Select an existing connection or create a new one.
Enter the Entity ID β The unique ID of the record to retrieve.
3. Create Record
Creates a new record in Contentful based on a specific content model and locale. You can decide whether to publish the record immediately or keep it as a draft.
Configuration Steps:
Select an existing connection or create a new one.
Select the Content Locale β Choose the language version for the new record.
Select the Content Model β Specify the structure for the new record.
Enable/Disable the 'Publish after creating' Option β Choose whether to publish the record immediately after creation.
4. Custom API Call
Configuration Steps:
Allows direct interaction with Contentfulβs API for advanced operations, such as retrieving, updating, or deleting records beyond standard actions.
Select an existing connection or create a new one.
Enter the URL β Use the full API URL or a relative path to the base URL.
Select the HTTP Method:
GET β Retrieve file or folder details.
POST β Upload new files or create folders.
PATCH β Modify file metadata or update folder permissions.
PUT β Replace existing content in a file.
DELETE β Remove a file or folder permanently.
HEAD β Fetch response headers only without retrieving data.
Additional Configurations:
Add Headers β Define additional headers for the API request. Authorization headers are automatically injected. Click β+ Add Itemβ to include more headers.
Add Query Parameters β Customize API requests with parameters to filter results or add options. Click β+ Add Itemβ to include more parameters.
Enter JSON Body β Provide structured request data in JSON format.
Set Timeout (in Seconds) β Specify a timeout duration for requests to avoid long-running API calls from causing delays in the process.
Note: Click βfβ to insert dynamic values for flexible configurations.
Last updated