> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryprofound.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Contentful in Workflows

After connecting your Contentful account, the following actions become available as Workflow steps. Each step requires you to select a connected **Contentful Account** from a dropdown.

> [tab] Create entry
>
> #### **Create entry**
>
> Create a new entry in your Contentful space.
>
> **Required inputs**
>
> * **Contentful Account**
> * **Space**
> * **Environment**
> * **Content Type**
> * **Fields** (dynamic based on content type schema)
>
> **Optional inputs**
>
> * **Locale** (defaults to space's default locale)
> * **Publish** (publish immediately or save as draft)
>
> Profound creates the entry based on your content type's schema. Rich text fields accept Markdown, which Profound converts to Contentful's rich text format.
>
> **Tip:** Leave **Publish** unchecked to create drafts for review before publishing.

> [tab] Update entry
>
> #### **Update entry**
>
> Update an existing entry in your Contentful space.
>
> **Required inputs**
>
> * **Contentful Account**
> * **Space**
> * **Environment**
> * **Entry ID**
>
> **Optional inputs**
>
> * **Fields** (only fields you want to update)
> * **Locale** (defaults to space's default locale)
> * **Publish** (publish changes immediately)
>
> **Important:** Profound modifies only the fields you provide. All other fields remain unchanged.

> [tab] Get entry
>
> #### **Get entry**
>
> Retrieve a single entry by ID.
>
> **Required inputs**
>
> * **Contentful Account**
> * **Space**
> * **Environment**
> * **Entry ID**
>
> The output includes the entry's full content with all fields and metadata.

> [tab] List entries
>
> #### **List entries**
>
> Retrieve a list of entries from your Contentful space.
>
> **Required inputs**
>
> * **Contentful Account**
> * **Space**
> * **Environment**
>
> **Optional inputs**
>
> * **Content Type** (filter by content type)
> * **Limit** (number of entries to return)
> * **Skip** (pagination offset)
>
> The output is a structured list of entries that you can use in downstream Workflow steps.

***

## Supported field types

Profound adapts to your Contentful content model and supports all field types:

| Field type | Description | Input format |
| - | - | - |
| **Short text** | Single-line text | Plain text |
| **Long text** | Multi-line text | Plain text |
| **Rich text** | Formatted content | Markdown (auto-converted) |
| **Number** | Decimal numbers | Number |
| **Integer** | Whole numbers | Integer |
| **Boolean** | True/false | Boolean |
| **Date & time** | ISO 8601 dates | Date string |
| **Location** | Geographic coordinates | `{lat, lon}` object |
| **JSON object** | Arbitrary JSON | JSON object |
| **Media** | Asset references | Asset ID |
| **Reference** | Entry references | Entry ID or array of IDs |

***

## Working with rich text

Rich text fields in Contentful use a structured document format called an abstract syntax tree (AST). Profound accepts **Markdown**, **HTML**, or **Contentful's native rich text JSON** format.

**Supported Markdown:**

* Headings (`# H1` through `###### H6`)
* Paragraphs
* **Bold**, *italic*, and other formatting
* Bullet and numbered lists
* Blockquotes
* Code blocks
* Links

**Supported HTML:**

* `<h1>` through `<h6>` headings
* `<p>` paragraphs
* `<strong>`, `<em>`, `<u>` formatting
* `<ul>`, `<ol>`, `<li>` lists
* `<blockquote>` blockquotes
* `<code>`, `<pre>` code blocks
* `<a>` links

**Native rich text JSON:**

If you already have Contentful rich text documents, pass them directly:

```json theme={null}
{
  "nodeType": "document",
  "data": {},
  "content": [
    {
      "nodeType": "paragraph",
      "data": {},
      "content": [
        { "nodeType": "text", "value": "Hello world", "marks": [], "data": {} }
      ]
    }
  ]
}
```

**Tip:** Use whichever format is most convenient for your workflow.

***

## Working with references

Reference fields link entries together. Provide either:

* **Single reference**: Just the entry ID as a string
* **Multiple references**: An array of entry IDs

Profound automatically compiles these into Contentful's required link format.

***

## Understanding locales

Contentful uses a locale-based content model where every field value is keyed by locale (for example, `en-US`, `fr-FR`). Profound handles this automatically:

* **Default behavior**: If you don't specify a locale, Profound uses your space's default locale
* **Single locale**: Specify a locale to write content in that language
* **Multi-locale**: Use the raw JSON format to write multiple locales at once

> [accordion] How locale wrapping works
>
> When you provide a simple field value like:
>
> ```json theme={null}
> {
>   "title": "My Blog Post"
> }
> ```
>
> Profound automatically wraps it for Contentful's API:
>
> ```json theme={null}
> {
>   "title": {
>     "en-US": "My Blog Post"
>   }
> }
> ```
>
> Profound applies locale wrapping to all fields before submitting them to Contentful.

***

## Input formats

Profound accepts two input formats for creating and updating entries:

> [tab] Simple format
>
> The simple format is human-friendly and handles locale wrapping automatically:
>
> ```json theme={null}
> {
>   "space": "your-space-id",
>   "environment": "master",
>   "content_type_id": "blogPost",
>   "locale": "en-US",
>   "fields": {
>     "title": "My Blog Post",
>     "body": "# Hello\n\nThis is **markdown**.",
>     "heroImage": "asset-123",
>     "relatedPosts": ["post-1", "post-2"]
>   },
>   "publish": false
> }
> ```
>
> **Features:**
>
> * Flat field structure (no locale nesting)
> * Simple string IDs for references
> * Markdown for rich text fields
> * Automatic locale wrapping

> [tab] Raw JSON format
>
> The raw format gives you full control over locale-specific content:
>
> ```json theme={null}
> {
>   "space": "your-space-id",
>   "environment": "master",
>   "content_type_id": "blogPost",
>   "fields": {
>     "title": {
>       "en-US": "My Blog Post",
>       "fr-FR": "Mon Article de Blog"
>     },
>     "body": {
>       "en-US": "# Hello\n\nEnglish content.",
>       "fr-FR": "# Bonjour\n\nContenu français."
>     }
>   },
>   "publish": false
> }
> ```
>
> **Use this format when:**
>
> * Writing content in multiple locales simultaneously
> * Controlling locale-specific values precisely
> * Migrating content from another system

***

## Common use cases

* **Content publishing**: Generate and publish blog posts, articles, or product descriptions
* **Content updates**: Bulk update existing entries with new information
* **Content migration**: Move content between environments or spaces
* **Automated Workflows**: Create entries based on external triggers or data sources

***

## Additional resources

Learn more about Contentful's content model and API:

* [Contentful Content Model Concepts](https://www.contentful.com/developers/docs/concepts/data-model/) - Understanding spaces, environments, and content types
* [Contentful Localization](https://www.contentful.com/developers/docs/concepts/locales/) - How locales work in Contentful
* [Rich Text Field Type](https://www.contentful.com/developers/docs/concepts/rich-text/) - Understanding Contentful's rich text format
* [Content Management API](https://www.contentful.com/developers/docs/references/content-management-api/) - Full API reference
