Sitecore Hackathon 2025: Our XM Cloud Content Export Tool
Fueled by caffeine and passion for coding, Sitecore Hackathon is a community-driven event where teams from all over the world compete to develop innovative Sitecore modules in a 24-hour window. Organized by Akshay Sura, each year, a list of topics (usually related to the newest Sitecore tech) is released one hour before kickoff, and teams then have 24 hours to develop a working module related to at least one of these topics. In addition to being a fun and rewarding event that fosters community and drives creativity and innovation, the Sitecore Hackathon has also been the starting point of many significant Sitecore modules.
Team DED
This year in the 11th Sitecore Hackathon, Velir was represented by Team DED:
- Dan Solovay, 12x Sitecore Technology MVP and Sitecore Practice Lead
- Erica Stockwell-Alpert, 6x Sitecore Technology MVP and Senior Support Developer
- Dylan Young, 6x Sitecore Technology MVP and Technical Lead
We had a few meetings before the Hackathon, where we discussed ideas for projects and technologies we could dig into. Even though I was hesitant to get too invested in any idea since we wouldn’t know what the topics would be until the day of the event, it turned out to be a good thing that we planned, because the topic turned out to be anything we wanted.
Content Export Tool for XM Cloud
As soon as we got the news that we could build whatever we wanted, I was eager to suggest the Content Export Tool. Since I learned that the Content Export Tool isn't compatible with XM Cloud, I’ve been eager to rewrite it as an XM Cloud-compatible module and ready it for the new Marketplace. I suggested this project to the team, pointing out that it would be a good chance to use the Sitecore Authoring and Management API (one of Sitecore's suggested technologies to explore). Dylan also saw an opportunity for AI integration, and Dan decided to dig into Docker to set up a reproducible Sitecore instance to integrate with the module. Dylan quickly spun up a simple NextJS application with Tailwind, smartly using AI to get a usable site skeleton up and running. From there, we were off to the races, and before we knew it, 8 p.m. the next night had already arrived. I was shaking from either exhaustion, excitement, or likely both, and our project was complete.
Digging into The Finished Project
Setup
Our finished module provided a simple user interface that can either be spun up locally or accessed at https://sitecore-content-export.vercel.app/.
Since the module is independent of Sitecore, you must first configure your instance credentials so that it can connect to the management or authoring API.
There are two ways to configure an instance, one for XM/XP and one for XM Cloud. To use an SC_Apikey for the management API, you can do the simple XP setup to put in your endpoint (e.g. https://edge.sitecorecloud.io/api/graphql/v1 or https://mysite.com/api/graph/items/master), and your Sitecore API Key.
This also works for the authoring API, but you would need to put in the authoring endpoint, and instead of an API key, you need to find and use your Authorization token.
If you're using XM Cloud, the XM Cloud registration can use the Client ID and Secret to automatically generate an Authorization token.
Exporting Content
Once you've set up your instance, you can use the Export Tool. Here’s how.
- Select your Instance from the dropdown.
- Enter your filters.
- Start Item(s): One or more item IDs specifying where to pull content from, separated by a comma. Defaults to the full content tree if none are supplied.
- Templates: One or more template IDs to specify what types of items to export.
- Fields: All fields you want in the export. Null/invalid fields will return "n/a" in the export, so you can include fields that do not exist on all items.
- Start Item(s): One or more item IDs specifying where to pull content from, separated by a comma. Defaults to the full content tree if none are supplied.
Once you click Export, it will request to pull the selected data and download a CSV file to your browser (just like the old Content Export Tool).
You can also save your export configurations.
Copilot
This service is like the export tool but uses AI with Gen AI Function Calling to parse together the correct parameters for the function. To use this feature, you must have the following configured:
- An OpenAI API Key
- Add this key to the API Tokens page within the App (currently the app only supports OpenAI).
- A connection to Edge or a Sitecore content delivery environment.
Once you are on the Copilot page (https://sitecore-content-export.vercel.app/content/copilot), you can select the instance you want to work with, the model from OpenAI that you want to use, and then the prompt you want to use to interact with the AI assistant. There are also shortcut buttons to enable specific commands to get to a specific point in the process with the Content assistant. Follow along with the prompts to get the content you need and convert that content into specific formats.
The Copilot Page uses the same code as the Export page to get and parse the content but wires it up to a chatbot that assists with the export.
Content Import (In Progress)
The final feature of the module is the Content Import. Unfortunately, it doesn't work yet, due to a CORS error when attempting to hit the Authoring endpoint from the browser. But we do have all the code written to generate the mutation queries. Dan did a deep dive into the CORS issue to determine if it was a configuration error with our Sitecore instance, or if this is a Sitecore bug, since some blog posts he found show that other people have run into the same issue. More on that to come. Here’s how you would import content if everything worked perfectly.
- Navigate to the Content Export Tool (/Content/Export).
- Select your Instance from the dropdown.
- Select the Import tab.
- Upload a CSV file.
- Required Columns for Update: Item Path
- Required Columns for Create: Item Path, Template, Name
- Select Update (default) or Create.
- Click Import.
The post requests to the authoring API do not currently work due to a CORS error, but you can see the generated GraphQL queries in the Console.
Takeaways from This Year’s Sitecore Hackathon
This is the third time I have participated in Sitecore Hackathon, and it is the most fun I've had. There are a few keys to a successful Hackathon (and by successful, I don't mean "winning"):
- Team is crucial. You need people who can work largely independently, but also support each other; people who like each other and laugh with each other; and people who don't want to rip each other's heads off at 5 a.m. Hackathon is a team event, so good team synergy is the most important thing.
- It's about the journey. If you go into Hackathon caring only about winning, you'll likely be disappointed, since only one team wins, and many of the teams are very good. It's Dan's philosophy that convinced me to do Hackathon again: "Don't even worry about winning, just view Hackathon as an opportunity to learn about something you're excited about." If you learned anything new, you've succeeded, and if you have a working module to submit to the judges (only about 50% of teams do), you should consider yourself a winner.
- Take naps! The other reason I did Hackathon is that Dan assured me that his [age redacted]-year-old self would definitely not stay up for 24 hours. Some teams go really gung-ho on the no-sleep, stay-up-for-24-hours-on-redbull-and-pizza challenge. In my experience, once you're so tired you're hallucinating, you're not writing very valuable code anyway. Permit yourself to take naps, walks, meal breaks, and care for your body and mind. If your team works best with constant communication, then sleep at the same time. If your team is very independent, you can stagger sleeping and pass the baton when it's time to rest.
In 24 hours, we got more done on the Content Export Tool for XM Cloud than I probably would have in six months. I am so grateful to my team for jumping on board with my idea, and I am really proud of what we put together. Long live Team DED!
Want to learn more about my Content Export Tool, or ways you can take advantage of Sitecore’s features to maximize your investment in it? Reach out. Our Sitecore experts would be happy to help you.