<!-- BusyBot node reference — https://busybot.net/tools/contentful/ -->

> Node: Contentful (`contentful`) · Action · v1
> Category: Development · Credentials: Contentful API (`contentfulApi`)
> Updated: 2026-08-16

# 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](https://busybot.net/credentials/contentful-api/) 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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "type": "contentful",
  "parameters": {
    "source": "deliveryApi",
    "resource": "asset",
    "operation": "get",
    "environmentId": "master",
    "assetId": "1x0xpXu4pSGS4OukSyWGUK",
    "additionalFields": {
      "rawData": false
    }
  }
}
```

List every asset, largest file first:

```json
{
  "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:

```json
{
  "type": "contentful",
  "parameters": {
    "source": "deliveryApi",
    "resource": "contentType",
    "operation": "get",
    "environmentId": "master",
    "contentTypeId": "blog-post",
    "additionalFields": {
      "rawData": false
    }
  }
}
```

List the locales configured in an environment:

```json
{
  "type": "contentful",
  "parameters": {
    "source": "deliveryApi",
    "resource": "locale",
    "operation": "getAll",
    "environmentId": "master",
    "returnAll": true
  }
}
```

Read space metadata:

```json
{
  "type": "contentful",
  "parameters": {
    "source": "deliveryApi",
    "resource": "space",
    "operation": "get"
  }
}
```

Preview draft entries that already have a publish date set:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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 as `fields.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 `sys` survives.** 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 needs `sys.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.