Contentful GraphQL

Query your Contentful content with GraphQL, delivered by AI in real time

Your content model lives in Contentful. Your AI agent runs GraphQL queries against it during live conversations, pulling blog posts, product descriptions, FAQ entries, and any content type you have modeled. Visitors get precise, structured answers sourced directly from your CMS.

Chosen by 800+ global brands across industries

GraphQL content queries your agent runs live

Your AI agent sends real GraphQL queries to Contentful's Content API, fetching exactly the fields and entries needed to answer each customer question with precision.

Contentful GraphQL

Use Cases

CMS-powered conversations in action

Real scenarios where AI pulls structured content from Contentful via GraphQL, turning your CMS into a live knowledge base for customer interactions.

Product Information That Never Goes Stale

A prospect asks 'What features are included in your Pro plan?' Your AI Agent runs a GraphQL query against your Contentful pricing content type, fetching the Pro plan's feature list, price, and comparison notes. Because it queries live CMS data, the answer reflects the update your marketing team published ten minutes ago. No manual chatbot retraining required.

Help Articles Served From Your CMS

A customer messages 'How do I reset my API key?' Your AI Agent executes a persisted GraphQL query that searches your Contentful help center content type by topic. It returns the relevant article body and step-by-step instructions directly in the chat. Your support team wrote the article once in Contentful, and the agent serves it everywhere.

Draft Content Review Without Dashboard Access

An editor asks the AI agent to preview an unpublished blog post before it goes live. The agent targets the Contentful preview environment, runs a GraphQL query with the entry slug as a variable, and returns the draft title, body, and author. The editor reviews content from their phone on WhatsApp without logging into the CMS dashboard.

Try
Contentful GraphQL

Contentful GraphQL

FAQs

Frequently Asked Questions

How does the AI agent construct GraphQL queries against my Contentful schema?

Contentful automatically generates a GraphQL schema based on your content types. The agent uses predefined query templates mapped to common customer questions, inserting variables like entry IDs or slugs as needed. You can also register persisted queries by SHA256 hash for frequently used patterns.

What is the difference between the Contentful REST integration and this GraphQL integration?

The REST integration (Contentful OAuth) provides space-level management operations like listing and updating spaces. This GraphQL integration queries actual content entries, assets, and fields within your spaces. Use REST for CMS administration and GraphQL for content delivery to end users.

Can the agent access unpublished draft content through the preview API?

Yes. By providing a Content Preview API (CPA) access token instead of a Content Delivery API (CDA) token, the agent can query draft and changed content. This is useful for content review workflows where editors want to preview entries before publishing.

What are persisted queries and when should I use them?

Persisted queries are pre-registered GraphQL queries identified by their SHA256 hash. The agent sends only the hash and variables instead of the full query text, reducing network payload and enabling queries that exceed the 8KB size limit. Use them for complex or frequently executed queries to improve performance.

Does the agent support cross-space content references in Contentful?

Yes. The GraphQL query endpoint accepts a resource_resolution parameter (Base64-encoded JSON) that maps cross-space links. Your agent can resolve references across up to four Contentful spaces in a single query, combining product data from one space with marketing copy from another.

How do I authenticate the Contentful GraphQL integration?

You provide two credentials in the Tars dashboard: your Contentful Space ID and an API Access Token. The token is sent as a bearer token with each GraphQL request. Use a CDA token for published content or a CPA token for draft previews. Tokens are stored securely and never exposed in conversations.

Does Tars store or cache my Contentful content?

No. Every query is executed live against Contentful's GraphQL API at graphql.contentful.com. Content entries, fields, and assets are fetched in real-time for each conversation. This means answers always reflect your latest published content without any cache delay or stale data.

Can the agent query content in multiple languages from Contentful?

Yes. Contentful's GraphQL API supports locale parameters. Your agent can specify a locale variable in the query to retrieve content in the customer's language. If your content types are localized across English, Spanish, French, or any other locale, the agent fetches the matching translation.

How to add Tools to your AI Agent

Supercharge your AI Agent with Tool Integrations

Don't limit your AI Agent to basic conversations. Watch how to configure and add powerful tools making your agent smarter and more functional.

Privacy & Security

We’ll never let you lose sleep over privacy and security concerns

At Tars, we take privacy and security very seriously. We are compliant with GDPR, ISO, SOC 2, and HIPAA.

GDPR
ISO
SOC 2
HIPAA

Still scrolling? We both know you're interested.

Let's chat about AI Agents the old-fashioned way. Get a demo tailored to your requirements.

Schedule a Demo