On-demand generation of SEO title and description using Automate

Overview
When building webpages, a common requirement is to write SEO metadata tailored to the content. An essential component of effective SEO is crafting engaging, relevant titles and descriptions that accurately represent each page’s content.
However, manually generating these elements for every new page can be both time-consuming and inefficient. You can create on-demand generation of SEO metadata by creating an automation workflow using Contentstack's Automate.
Contentstack → Automate → ChatGPT API → Update SEO entry fields

This tutorial walks you through setting up on-demand SEO title and description generation using Automate and ChatGPT. By leveraging these tools, you can streamline your workflow, ensure consistency and accuracy across your webpages, and significantly reduce manual effort.
Prerequisites
This guide assumes familiarity with:
- Contentstack Automate
- On-Demand Extension
- A working knowledge of SEO
Creating on-demand SEO metadata
To implement this guide, we will utilize the following components:
ChatGPT API
1. Configuring your content type
Begin by configuring a Content Type in Contentstack for the webpage. This Content Type should include all the necessary fields to support content creation and SEO metadata automation.
Key fields to define include:
Main Content: Typically created using the JSON Rich Text Editor (RTE) field.
SEO Title: A dedicated field where the generated title will be stored.
SEO Description: A field designated for the auto-generated meta description.
These SEO fields will be populated dynamically through the automation process, ensuring they remain contextually relevant and aligned with the page content.
By structuring your Content Type in this way, you enable reliable extraction and processing of content, laying the groundwork for seamless metadata generation.
2. Setting up Automate
Next, set up an On-Demand Automation project within Contentstack Automate. This will allow the automation to be triggered manually from the entry sidebar, offering flexibility and control over when metadata generation occurs.
Follow the steps below to configure the automation:
Step 2.1: Create an on-demand automation project
Navigate to Automate > On-demand automation projects.
Click Create Project or open an existing one tailored for SEO tasks.
Step 2.2: Configure the automation for entries
Select On-Demand Automation for Entries as the workflow type.
Set the Connector to On-Demand Automation.
Choose the Trigger: Entry Sidebar.
Define the following configuration parameters:
Stack: Choose the relevant Stack where your content resides.
Branch: Select the appropriate branch (e.g., main or development).
Content Type: Specify the content type you created for web pages.

This configuration enables users to trigger metadata generation directly from the entry sidebar in the Contentstack UI, offering a smooth, contextual workflow for content editors.
3. Preparing content for querying
In most implementations, the main content is authored using JSON Rich Text Editor (RTE). However, since external APIs like the ChatGPT API typically expect input in plain text or HTML, it is important to convert the JSON RTE content into a readable format before querying.
To handle this transformation, we will use the RTE Formatter connector to convert JSON RTE content into HTML.
3.1 Process to format content:
Select the RTE Formatter Connector
- Add the RTE Formatter step to your automation flow.
Choose the Action, select the action “Format JSON RTE Content to HTML.”
Configure the Action:
Specify the content field that contains the JSON RTE.
Ensure the field path is accurate, especially if it is nested within components or groups.

Once converted, the HTML content is ready to be sent as input to the ChatGPT API for generating SEO metadata.
3.2 Generate SEO title using ChatGPT
Use the ChatGPT connector along with the appropriate prompt to generate the SEO Title. Below is an example of the prompt you can use:
Given a content from an article, create a concise and engaging SEO title. The input text will be provided in HTML format.
Do not enclose the output in quotes.
```{{FieldId}}```
Brand Tone of Voice:
The tone should be warm, welcoming, and informative...
AI Governance:
Ensure the generated content accurately reflects the information available on the respective website. Maintain clarity and precision in description to avoid misleading potential visitors. All generated content should seamlessly integrate into the client's CMS without manual editing or corrections.

3.3 Generate SEO description using ChatGPT
Use the ChatGPT connector along with the appropriate prompt to generate the SEO Description. Below is an example of the prompt you can use:
Given a content from an article, create a concise and engaging SEO description. The input text will be provided in HTML format.
Do not enclose the output in quotes.
```{{FieldId}}```
Brand Tone of Voice:
The tone should be warm, welcoming, and informative...
AI Governance:
Ensure the generated content accurately reflects the information available on the respective website. Maintain clarity and precision in description to avoid misleading potential visitors. All generated content should seamlessly integrate into the client's CMS without manual editing or corrections.

3.4 Update the entry with SEO details
Once ChatGPT generates the SEO title and description, the next step is to automatically update the corresponding entry with this metadata. To do this, you’ll need to add a step in Contentstack Automate that writes the generated SEO details back into the entry. This ensures the AI-generated metadata is seamlessly integrated into your content, keeping your entries up-to-date without manual intervention.

Conclusion
By following this guide, you can automate the generation of SEO titles and descriptions using Contentstack Automate and the ChatGPT API, saving valuable time and reducing manual workload. This solution ensures metadata is consistently accurate, optimized for search engines, and tailored to your brand’s tone of voice. With automation triggered by content events, you can scale effortlessly while keeping your SEO efforts aligned with your publishing workflow. The result is a streamlined process that improves efficiency, enhances discoverability, and maintains brand integrity across all your digital content. Ultimately, it’s a smart, scalable approach to managing SEO metadata in a modern content ecosystem.
Have questions or feedback about this guide or Contentstack in general? Join the Contentstack Discord Community to get help and meet your peers!
About Contentstack
The Contentstack team comprises highly skilled professionals specializing in product marketing, customer acquisition and retention, and digital marketing strategy. With extensive experience holding senior positions at renowned technology companies across Fortune 500, mid-size, and start-up sectors, our team offers impactful solutions based on diverse backgrounds and extensive industry knowledge.
Contentstack is on a mission to deliver the world’s best digital experiences through a fusion of cutting-edge content management, customer data, personalization, and AI technology. Iconic brands, such as AirFrance KLM, ASICS, Burberry, Mattel, Mitsubishi, and Walmart, depend on the platform to rise above the noise in today's crowded digital markets and gain their competitive edge.
In January 2025, Contentstack proudly secured its first-ever position as a Visionary in the 2025 Gartner® Magic Quadrant™ for Digital Experience Platforms (DXP). Further solidifying its prominent standing, Contentstack was recognized as a Leader in the Forrester Research, Inc. March 2025 report, “The Forrester Wave™: Content Management Systems (CMS), Q1 2025.” Contentstack was the only pure headless provider named as a Leader in the report, which evaluated 13 top CMS providers on 19 criteria for current offering and strategy.
Follow Contentstack on LinkedIn.

