Reference · Tools
Contentful
Read content entries, assets, content types, locales, and space information from the Contentful headless CMS
The Contentful node fetches published or draft content from your Contentful space — entries, assets, content types, locales, and space metadata — without writing anything back. Use it to pull blog posts into a downstream email campaign, sync product copy to another system, or audit content types on a schedule. Every operation is a read.
- Node type
- Action
- Parameters
- 19
- Outputs
- Output, Error
- Credentials
- Contentful API
Contentful
Read content from Contentful headless CMS
Overview
Contentful is a headless CMS platform. This tool reads content via the Content Delivery API (published content) or Content Preview API (draft content). It supports reading entries, assets, content types, locales, and space metadata. Filtering, ordering, full-text search, and pagination are supported for collection endpoints.
Category: Development
Tool Name: contentful
Version: 1
Appearance: Icon: si-contentful | Color: #2478CC
Node Type
Action — processes input items and produces output
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Contentful API credentials. See the Credentials Guide for setup instructions.
Resources
| Resource | Value |
|---|---|
| Asset | asset |
| Content Type | contentType |
| Entry | entry |
| Locale | locale |
| Space | space |
Operations
Each resource offers its own set of operations.
| Resource | Operation | Value | Description |
|---|---|---|---|
| Asset | Get | get | Retrieve a specific asset by ID |
| Asset | Get Many | getAll | Retrieve multiple assets with optional filtering |
| Content Type | Get | get | Retrieve a specific content type by ID |
| Entry | Get | get | Retrieve a specific entry by ID |
| Entry | Get Many | getAll | Retrieve multiple entries with optional filtering |
| Locale | Get Many | getAll | Retrieve the locales configured in the environment |
| Space | Get | get | Retrieve space information |
Parameters
The Space resource’s Get operation takes no parameters of its own — see All Operations.
Asset: Get
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Environment ID | string | No | master | The ID for the Contentful environment (e.g. master, staging). If your plan does not support environments, use “master”. Supports expressions. |
| Asset ID | string | Yes | — | The ID of the asset to retrieve. Supports expressions like {{ $json.assetId }}. |
| Additional Fields | collection | No | {} | Extra options for this request. |
| — RAW Data | boolean | No | false | Whether to return the full raw response including sys metadata, instead of just the fields. |
Asset: Get Many
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Environment ID | string | No | master | The ID for the Contentful environment (e.g. master, staging). If your plan does not support environments, use “master”. Supports expressions. |
| Return All | boolean | No | false | Whether to return all results or only up to a given limit. |
| Limit | number | No | 100 | Max number of results to return. (shown when Return All is false) |
| Additional Fields | collection | No | {} | Filters, ordering and response options for the asset query. |
| — Equal | string | No | — | Equality filter: {attribute}={value}. Attribute can use dot notation. For example fields.title=n8n. |
| — Exclude | string | No | — | Exclusion filter: {attribute}[nin]={value}. Attribute can use dot notation. For example fields.tags[nin]=accessories,flowers. |
| — Exist | string | No | — | Existence filter: {attribute}[exists]={value}. Attribute can use dot notation. For example fields.tags[exists]=true. |
| — Fields | string | No | — | Select which fields to return. Combine multiple values with commas. |
| — Include | string | No | — | Inclusion filter: {attribute}[in]={value}. Attribute can use dot notation. For example fields.tags[in]=accessories,flowers. |
| — Not Equal | string | No | — | Inequality filter: {attribute}[ne]={value}. Attribute can use dot notation. For example fields.title[ne]=n8n. |
| — Order | string | No | — | Sort order for results. Use sys properties or field values. Prefix with - for descending. |
| — Query | string | No | — | Full-text search query. Case insensitive, must be at least 2 characters. |
| — RAW Data | boolean | No | false | Whether to return the full raw response including sys metadata, instead of just the fields. |
Content Type: Get
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Environment ID | string | No | master | The ID for the Contentful environment (e.g. master, staging). If your plan does not support environments, use “master”. Supports expressions. |
Content Type ID (contentTypeId) | string | Yes | — | The ID of the content type to retrieve. Supports expressions. |
| Additional Fields | collection | No | {} | Extra options for this request. |
| — RAW Data | boolean | No | false | Whether to return the full raw response including sys metadata, instead of just the fields. |
Entry: Get
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Environment ID | string | No | master | The ID for the Contentful environment (e.g. master, staging). If your plan does not support environments, use “master”. Supports expressions. |
| Entry ID | string | Yes | — | The ID of the entry to retrieve. Supports expressions like {{ $json.entryId }}. |
| Additional Fields | collection | No | {} | Extra options for this request. |
| — RAW Data | boolean | No | false | Whether to return the full raw response including sys metadata, instead of just the fields. |
Entry: Get Many
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Environment ID | string | No | master | The ID for the Contentful environment (e.g. master, staging). If your plan does not support environments, use “master”. Supports expressions. |
| Return All | boolean | No | false | Whether to return all results or only up to a given limit. |
| Limit | number | No | 100 | Max number of results to return. (shown when Return All is false) |
| Additional Fields | collection | No | {} | Filters, ordering and response options for the entry query. |
— Content Type ID (content_type) | string | No | — | Filter entries by content type ID. |
| — Equal | string | No | — | Equality filter: {attribute}={value}. Attribute can use dot notation. For example fields.title=n8n. |
| — Exclude | string | No | — | Exclusion filter: {attribute}[nin]={value}. Attribute can use dot notation. For example fields.tags[nin]=accessories,flowers. |
| — Exist | string | No | — | Existence filter: {attribute}[exists]={value}. Attribute can use dot notation. For example fields.tags[exists]=true. |
| — Fields | string | No | — | Select which fields to return. Combine multiple values with commas. |
| — Include | string | No | — | Inclusion filter: {attribute}[in]={value}. Attribute can use dot notation. For example fields.tags[in]=accessories,flowers. |
| — Not Equal | string | No | — | Inequality filter: {attribute}[ne]={value}. Attribute can use dot notation. For example fields.title[ne]=n8n. |
| — Order | string | No | — | Sort order for results. Use sys properties or field values. Prefix with - for descending. |
| — Query | string | No | — | Full-text search query. Case insensitive, must be at least 2 characters. |
| — RAW Data | boolean | No | false | Whether to return the full raw response including sys metadata, instead of just the fields. |
Locale: Get Many
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Environment ID | string | No | master | The ID for the Contentful environment (e.g. master, staging). If your plan does not support environments, use “master”. Supports expressions. |
| Return All | boolean | No | false | Whether to return all results or only up to a given limit. |
| Limit | number | No | 100 | Max number of results to return. (shown when Return All is false) |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Source | options | No | deliveryApi | Pick where your data comes from: Delivery API (published content) or Preview API (draft content). |
Options: deliveryApi, previewApi | ||||
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
The Contentful response is merged onto the input item’s JSON — incoming fields pass through and stay addressable downstream, and binary data is forwarded unchanged. Content fields sit at the top level of the item, not under a wrapper property.
| Resource / Operation | Output |
|---|---|
Entry get | One item. With RAW Data off, only the entry’s fields are merged. With RAW Data on, the whole response is merged, including sys. |
Entry getAll | Fans out — one output item per entry. With RAW Data off each item carries that entry’s fields; with RAW Data on it carries the whole entry object. |
Asset get | One item, following the same RAW Data rule as Entry get. |
Asset getAll | Fans out — one output item per asset, following the same RAW Data rule as Entry getAll. |
Content Type get | One item. With RAW Data off the content type’s field definitions are attached as an array on fields; with RAW Data on the whole content type object is merged. |
Locale getAll | Fans out — one output item per locale, always the full locale object. RAW Data has no effect here. |
Space get | One item carrying the space object. |
The getAll operations are the ones that change the item count, so a node downstream of them sees one item per record rather than one per input item. A query that matches nothing produces no output items at all.
With RAW Data off the sys block — which carries id, createdAt, updatedAt, contentType and the rest of the metadata — is not on the item. Turn RAW Data on whenever a downstream node needs an entry or asset ID.
Reference the returned data downstream by expression, e.g. {{ $json.title }} with RAW Data off, or {{ $json.sys.id }} with it on.
Usage Examples
- Get a specific blog post entry from Contentful
- List all published entries of a content type
- Fetch asset metadata from Contentful
- List all locales configured in a Contentful space
- Get the content type schema definition
Example Configuration
Get one entry by ID:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "entry",
"operation": "get",
"environmentId": "master",
"entryId": "5KsDBWseXY6QegucYAoacS",
"additionalFields": {
"rawData": false
}
}
}
List the ten newest entries of one content type, selecting only a few fields:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "entry",
"operation": "getAll",
"environmentId": "master",
"returnAll": false,
"limit": 10,
"additionalFields": {
"content_type": "blog-post",
"order": "-sys.createdAt",
"select": "fields.title,fields.slug,sys.createdAt",
"rawData": false
}
}
}
Get one asset by ID:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "asset",
"operation": "get",
"environmentId": "master",
"assetId": "1x0xpXu4pSGS4OukSyWGUK",
"additionalFields": {
"rawData": false
}
}
}
List every asset, largest file first:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "asset",
"operation": "getAll",
"environmentId": "master",
"returnAll": true,
"additionalFields": {
"select": "fields.title,fields.file",
"order": "-fields.file.details.size",
"rawData": false
}
}
}
Read a content type’s schema:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "contentType",
"operation": "get",
"environmentId": "master",
"contentTypeId": "blog-post",
"additionalFields": {
"rawData": false
}
}
}
List the locales configured in an environment:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "locale",
"operation": "getAll",
"environmentId": "master",
"returnAll": true
}
}
Read space metadata:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "space",
"operation": "get"
}
}
Preview draft entries that already have a publish date set:
{
"type": "contentful",
"parameters": {
"source": "previewApi",
"resource": "entry",
"operation": "getAll",
"environmentId": "master",
"returnAll": false,
"limit": 5,
"additionalFields": {
"content_type": "blog-post",
"exist": "fields.publishedDate[exists]=true",
"rawData": false
}
}
}
Fetch published blog posts for a site build:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "entry",
"operation": "getAll",
"environmentId": "master",
"returnAll": false,
"limit": 20,
"additionalFields": {
"content_type": "blog-post",
"order": "-fields.publishedDate",
"select": "fields.title,fields.slug,fields.excerpt,fields.publishedDate,fields.author",
"rawData": false
}
}
}
Fetch image assets only, newest first:
{
"type": "contentful",
"parameters": {
"source": "deliveryApi",
"resource": "asset",
"operation": "getAll",
"environmentId": "master",
"returnAll": false,
"limit": 50,
"additionalFields": {
"include": "fields.file.contentType[in]=image/jpeg,image/png",
"select": "fields.title,fields.file",
"order": "-sys.createdAt",
"rawData": false
}
}
}
Preview a single draft entry in a non-production environment:
{
"type": "contentful",
"parameters": {
"source": "previewApi",
"resource": "entry",
"operation": "get",
"environmentId": "staging",
"entryId": "{{ $json.draftEntryId }}",
"additionalFields": {
"rawData": false
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Read entries, assets, content types, locales, and space info from the Contentful headless CMS using the Delivery or Preview API.
Behavior notes
- This node reads; it does not write. Every operation is a fetch — there is no create, update, publish or delete.
- Source picks both the host and the token. Delivery API returns published content using the delivery key on your credential; Preview API returns drafts using the preview key. Configure the matching key on the credential before switching Source.
- The space comes from the credential, not from a parameter. Point the node at another space by selecting a different credential.
- Filter fields must contain an
=. Equal, Not Equal, Include, Exclude and Exist are each written as one complete expression such asfields.tags[in]=accessories,flowers; the part before the=becomes the query parameter and the part after becomes its value. A value without an=is ignored silently, so the query runs unfiltered. - RAW Data controls whether
syssurvives. With it off you get just the content fields, which is convenient but drops every ID and timestamp. Turn it on when a later node needssys.id. - Return All pages through everything in blocks of 100; the Limit field only applies when Return All is off.
- Full-text Query needs at least two characters and is case insensitive.
Frequently asked questions
Can I create, update, or publish content through this node?
No. Every operation this node performs is a fetch. There is no create, update, publish, or delete capability. If you need to write content back to Contentful, you would need a different integration method — this node is strictly for reading.
How do I access draft content instead of published content?
Set the Source field to Preview API. This switches both the API host and the token used — the node will send requests with the preview key stored on your credential rather than the delivery key. Make sure you have added the preview key to your Contentful credential before switching, otherwise requests will fail. The delivery key only returns published content.
How do I target a different Contentful space?
The space is determined by the credential selected on the node, not by any parameter inside it. To read from a different space, create a second Contentful credential configured for that space and select it on the node. You cannot override the space inline.
My filter isn't working and the node returns everything — what's wrong?
Every filter expression must contain an `=` sign. The node splits on `=` to separate the query parameter from its value, so an expression like `fields.tags[in]=accessories,flowers` is correct, but writing just `fields.tags[in]` with no `=` is silently ignored and the query runs unfiltered. Double-check that each filter field you enter is a complete expression.
When should I turn on Raw Data, and what do I lose if I leave it off?
With Raw Data off, the node returns only the content fields, which is often cleaner for downstream steps. However, it drops the entire `sys` object, meaning you lose `sys.id`, timestamps, version numbers, and other metadata. Turn Raw Data on whenever a later node needs to reference an entry's ID or any system field.
Build with the Contentful node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Contentful API credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.