Sitecore Connect is Sitecore’s low-code integration platform designed to easily automate workflows between Sitecore and external systems, without heavy custom coding. If you’re new to Sitecore Connect or want a deeper understanding of when and how to use it, check out these helpful resources:
- When to Choose Sitecore Connect: Solving Integration Challenges
- Understanding Sitecore Connect: Building Integrations with Recipes
In this practical example, we’ll demonstrate how to use Sitecore Connect together with OpenAI to send a page URL and fetch AI-generated meta tags (like meta title and meta description) to enrich the page’s SEO.
We will walk through:
- Setting up a connection to OpenAI using Sitecore Connect’s HTTP app
- Building a recipe that:
- Triggers when a page is created or updated
- Sends the page URL to OpenAI with a prompt asking for meta tags
- Receives and processes AI-generated meta title and meta description
This approach enhances your content creation workflows by generating smart SEO metadata at scale, using minimal manual effort and maximum AI power.
Step 1: Creating a Connection with OpenAI
To start integrating OpenAI with Sitecore Connect, the first step is to create a connection using your OpenAI API key.
Follow these steps:
- Obtain the API Key:
- Login to your OpenAI account (such as through ChatGPT platform or OpenAI portal).
- Navigate to your account settings and generate an API key.
(Keep this key safe as you will need it for authentication.)
- Create a New Connection:
- In Sitecore Connect, click on the Create Connection button.
- Choose OpenAI from the App Library:
- A list of available apps will be displayed.
- Use the search bar to find “OpenAI” and select it.
- Click on Create Connection.
- Configure the Connection:
- Enter the following details:
- Name: Provide a meaningful name for your connection (e.g., “OpenAI Meta Tag Generator”).
- Location: Select the workspace or folder where you want the connection saved.
- API Key: Paste the API key you copied from your OpenAI account.
- Enter the following details:
- Authenticate and Test:
- Click on the Connect button.
- Sitecore Connect will attempt to authenticate with OpenAI using the provided API key.
- If the authentication is successful, your connection will be created and ready to use.
With the OpenAI connection established, we can now move on to building a recipe to send page URLs and retrieve meta tag suggestions!
Step 2: Building the Recipe Function to Send Page URL and Fetch Meta Tags
Now that the connection to OpenAI is ready, let’s create a Recipe Function in Sitecore Connect.
This allows you to call the function from anywhere (like another recipe or an external system) by passing the page URL dynamically.
Follow these updated steps:
- Create a New Recipe Function:
- In Sitecore Connect, go to the Recipes section.
- Click on Create Recipe.
- In the trigger selection screen, choose Build a Recipe Function.
(This creates a callable function, not a direct event-based recipe.)
- Add Input Parameter for Page URL:
- After creating the function, Sitecore Connect will prompt you to define input parameters.
- Add a new parameter:
- Name: Page URL
- Type: Text / String
- This parameter will allow the function to receive any page URL dynamically.
- Select App and Action:
- Once the function is ready, click on Add an Action.
- The App Library will open.
- Using the connection you created earlier,select OpenAI from the available apps.
- Choose the Action Type:
- After selecting OpenAI, you will see a list of available actions.
- Select the Send a Message action.
- It provides 2 options Single message and Chat transcript.
- I chose Single Message as the message type for this case.
Now, in the Message Content to OpenAI, configure it carefully:
Prompt to OpenAI:
- Here, {Page URL} dynamically uses the Page URL input parameter you defined in Step 2.
This ensures that OpenAI receives the correct URL, understands the task, and responds in a structured JSON output ready for further processing.
After setting this message, you will be ready to handle and use the response in the next steps!
Step 3: Handling the OpenAI Response
Once OpenAI processes the URL and sends back a response, we need to parse the result and map it to usable fields inside Sitecore Connect.
This step ensures the meta title and meta description are correctly extracted and available for further use.
Follow these steps:
- Parse the JSON Response:
- After the OpenAI action, add a Parse JSON step.
- Configure it to parse the body of the response you get from OpenAI.
- Define the expected schema based on the format you instructed OpenAI to return:
- {
- “meta_title”: “string”,
- “meta_description”: “string”
- }
- Sitecore Connect will now recognize meta_title and meta_description as separate variables you can use.
- Use the Parsed Data:
- After parsing, you can now:
- Return the meta title and meta description as the output of the Recipe Function.
- OR, if part of a larger automation, map these fields directly into your Sitecore items.
- After parsing, you can now:
- Test the Flow:
- Use the Test function inside Sitecore Connect.
- Provide a sample Page URL as input.
- Run the recipe function and validate that:
- OpenAI is called correctly.
- The JSON response contains the expected meta title and meta description.
- The fields are parsed and mapped properly.
Conclusion
By using Sitecore Connect and OpenAI together, you can create powerful, scalable automations that enhance your content operations.
In this example, it is showed how to send a page URL to OpenAI, fetch SEO metadata, and integrate it seamlessly into Sitecore workflows — all without writing heavy custom code.
This type of automation opens new possibilities for smarter, faster content management at enterprise scale.
Source: Read MoreÂ