> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/integrations/overview/integrations/contentful.md).

# Contentful

Integrate your Workflow with Contentful

<figure><img src="https://3762890407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-696c2b7d3b7c70c7f042236dcf0a7d5e51d5bff2%2Fcontentful-step-01-actions.png?alt=media" alt="Contentful Integration step with the Action dropdown listing Create Entry, Create Entry (JSON), List Entries, Get Entry, and Update Entry (JSON)"><figcaption><p>Choose a Contentful action.</p></figcaption></figure>

The Contentful Integration allows you to create, list, get, and update entries.

## Authentication

1. **Generate a Personal Access Token from Contentful:**
   * Log in to your Contentful account.
   * Navigate to settings, then click on "CMA Tokens."
   * Press the "Create Personal Access To" button.
   * Provide a descriptive name for the token to identify its usage easily.
   * After the token is generated, make sure to copy and securely store it immediately, as it will not be displayed again.
2. **Add the Personal Access Token to Your Workspace:**
   * Go to <https://app.airops.com/account/integrations>
   * Find the section for Contentful integration and click on the "Configure" button.
   * In the modal that appears, paste the copied Personal Access Token into the designated field.
   * For a full-access authentication, you can also enter an optional **Space ID** to store it with the connection.
   * For a full-access authentication, click **Test connection**, review the results, then **Save integration**. Testing includes the Space ID when configured. See [Test a connection](/your-workspace/settings/authentications.md#test-a-connection) for result details.

**Security Note:** Treat your Personal Access Token like a password. It provides full access to your Contentful space, and it should not be shared. Store it securely and only use it in server-side or secure, authenticated environments.

## Functions and Their Parameters

#### Create Entry

1. **Space**: Select a Contentful space.
2. **Environment**: Select a Contentful environment
3. **Content Type**: Select a Contentful content type
4. **Locale (optional)**: Content locale. By default en-US

* After you select the Content Type, new fields will appear according to the option selected.

#### Create Entry (JSON)

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Content Type ID**
4. **JSON**: A JSON object containing the fields for your entry, example:

```
{
   "fields": {
      "title": {
         "en-US": "Hello, World!"
      },
      "body": {
         "en-US": "Is bacon healthy?"
      }
   }
}
```

#### List Entries

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Limit (optional)**: How many entries to fetch.
4. **Skip (optional)**: How many entries to skip first when collecting the response.

#### Get Entry

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Entry ID**: The ID or slug of the entry you want to retrieve
4. **Locale (optional)**: Content locale. By default en-US

#### Update Entry (JSON)

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Content Type ID**: The ID of the Content Type you are going to create.
4. **Entry ID**: The ID of the entry you want to update
5. **JSON**: A JSON object containing the fields to update, example:

```
{
   "title": {
      "en-US": "Hello, World!"
   },
   "body": {
      "en-US": "Bacon is healthy!"
   }
}
```

#### Upload Image

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Image Url**
4. **Title (optional)**
5. **Description (optional)**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/integrations/overview/integrations/contentful.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
