-
Content generation with Sitecore Connect and ChatGPT
November 8, 2023 Rodrigo Peplau 1
DISCLAIMER: Sitecore Connect is only allowed to be used to Connect to and from Sitecore Products. The following recipe doesn’t utilize any other Sitecore product beyound Sitecore Connect. To adhere to the terms of use, you need to have other recipes where Sitecore Connect is used alongside with at least another Sitecore Product
In today’s digital era, content is not just king: it’s the entire kingdom. Every content creator, marketer, and website owner know the effort it takes to keep the content wheel spinning. It’s only fair that we use technology in our favor to create a breezy, automated workflow.
That’s precisely what I’ve crafted with Sitecore Connect, ChatGPT, and WordPress: a script to bridge RSS feeds into a WordPress website, using the artificial intelligence of ChatGPT to automatically generate articles to promote other posts.
The (brand new) Go Horse Website
At the core of this experience is the new Go Horse website, built to spread the thoughts of our Hackathon Group across the community. The intention was to amplify the reach of the posts crafted by our group members, making each entry also accessible at the Go Horse Website, not as mere repetitions of the original posts, but as quality crafted, organic promotional posts. How does one orchestrate such a feat without getting enslaved in the web of manual curation? The answer was clear: Sitecore Connect automation with a touch of artificial intelligence.
The following image shows the basic flow: the RSS Feeds of our group members are monitored for new posts. As soon it’s found, its content is sent to ChatGPT and used to generate the promotional text, which will then be used to create the new promotional post at the target WordPress via RestAPI.
Installing and configuring the Recipe
To ease our lives, I’ve exported the recipe as the package smart-promote-post.zip (right click > save link as), so that you can easily install it at your Sitecore Connect instance.
The installation is as simple as a few clicks:
- On Sitecore Connect, navigate to ‘Tools’ > ‘Recipe Lifecycle Management’
- Head over to the ‘Import’ tab and click ‘Import’
- Select the ‘smart-promote-post.zip’ file
- Choose your target folder to import
- Review the content and import the package
After the installation, you also must configure the script according to your needs, following the steps below:
- Set up connection “My OpenAI account” with your OpenAI API key, and the “Target WordPress” with your WordPress Base URL (Eg: https://gohorse.tech/)
- In Step 2 (Create Parameters list) update the following parameters:
- “Target category ID” must point to the WordPress Category ID that you want to associate with the generated articles
- “Target wordpress login” must be a valid user account in your WordPress with proper permission to create new articles
- “Target wordpress password” is the password to the above account
- In Step 3 (Create Sources list), add the RSS URLs that you want to use as source and the respective author names
- In Step 13, change the “User” property to reflect the unique identifier of your end-user to OpenAI
Lookup Tables: Processing articles only once
Of course, we want our articles to be processed only once. Sitecore Connect has a feature called “Lookup Tables”, that here is being leveraged as a local storage to make sure articles are not processed twice, preserving exclusivity and importance.
As each member’s contribution lights up the Go Horse website, the post is marked as processed, keeping the digital space alive with new ideas and insights.
Generic HTTP Connections: Simple but effective
One very powerful feature leveraged multiple times in this script was the Generic HTTP connections. They are highly important as they can easily connect to any WebAPI, and are so extensive that can be used to build any kind of HTTP calls, similar to Postman.
These flexible conduits of data are crucial in two pivotal chapters of this tale: Reading the RSS feed URLs
And populating our WordPress site with the generated content:
Using ChatGPT to generate content
The heart of our content transformation lies in the ChatGPT prompt — crafted after much iteration and contemplation. The ‘Gpt query context’ parameter isn’t just a string of words; it’s the secret sauce for the generation of quality content. Integrating ChatGPT into this workflow was less of a challenge and more of a surprise for how easy it was to accomplish.
This is how the prompt looks like:
You are a marketer content editor, your mission is to create a promo text based on the input article to promote the original post, encouraging readers to click the original link. - Output the "title", "link text" and "content" only, nothing else - no emoticons should be used - "title", "link text" and "content" must be different from the original post (no copy - be creative) - Line 1 contains the "title" only, no exclamations, avoid appealing words such as "Advanced" and "Unleash" - Line 2 contains "link text" only, nothing else - Line 3, 4 and 5 contains the content only, nothing else, respecting the following: -- Only 3 short paragraphs, nothing else (use <p> tags) -- Instigate curiosity but don't reveal the key infos from the original post -- Use 3rd person texting, mentior the author by his name - Example of a valid 5 lines output: Powershell Packaging: Regaining the Power Click here to read more <p>Line 1 of generated content</p> <p>Line 2 of generated content</p> <p>Line 3 of generated content</p>
How the recipe looks like
For your reference, this is a screenshot of the recipe:
Categories: ChatGPT, SItecore Connect
XM Cloud Starter Kit with Content Hub Integration Meet MVPinny: the AI-Powered Sitecore Assistant
One thought on “Content generation with Sitecore Connect and ChatGPT”
Leave a Reply to Adriana Cancel reply
Proudly 9x Sitecore MVP
(2016-2024)
Localization
Recent Posts
Recent Comments
- navan on Meet MVPinny: the AI-Powered Sitecore Assistant
- Adriana on Content generation with Sitecore Connect and ChatGPT
- NAVAN on Automatic Sitecore NuGet upgrades with Powershell
- Hedipo S Menezes on Corey Peplau wrote this - WFFM conflict with Unity DI and a lesson on how Sitecore community is so amazing
- Rodrigo Peplau on ERROR [Content Testing]: Cannot find PhantomJS executable at ' (...) /data/tools/phantomjs/phantomjs.exe'. Aborting screenshot generation.
Archives
- June 2024
- April 2024
- February 2024
- December 2023
- November 2023
- August 2023
- July 2023
- January 2023
- February 2022
- December 2021
- November 2021
- March 2021
- July 2020
- February 2020
- September 2019
- July 2019
- April 2019
- March 2019
- December 2018
- February 2018
- January 2018
- November 2017
- September 2017
- August 2017
- July 2017
- March 2017
- February 2017
- November 2016
- September 2016
- August 2016
- July 2016
- April 2016
- November 2015
- September 2015
- July 2015
- April 2015
- March 2015
- February 2015
Categories
- Actions
- Active Directory
- Analytics
- Architecture
- Bug fixing
- CDP/Personalize
- ChatGPT
- Content Edition Experience
- Content Hub
- Continuous Integration
- Dev
- Development
- Environments
- Experience Editor
- Experience Forms
- Front-end
- Health Check builds
- Helix
- How To
- LDAP
- MVP
- MVP Summit
- MVPinny
- Phantom JS
- Powershell
- QA
- Richtext Editor
- Rules
- Security Provider
- SIF
- Sitecore 9
- Sitecore API
- Sitecore Community
- SItecore Connect
- Sitecore Modules
- Sitecore Rocks
- Sitecore Rule Processor
- Sitecore Symposium
- SPE
- SPEAK
- SUG
- Support Ticket
- TDS
- Team City
- Uncategorized
- Upgrades
- Visual Studio
- WFFM
- Workflow
- XConnect
- xDB
- XM Cloud
Hey! I know just a bit about programing, web, etc. I have to say that Wow! little bro I am impressed!!! You improved so.much your English and your writing style definitely it feels like you are in front of me. Even without lots of knowledge on the subject I actually understood your creation! Way to go! Fly high bro…fly high! You are amazing! Love you!