An AI Product Importer for the Medusa admin. You can paste in product data in any form: JSON, XML, csv, text, etc - and the LLM will turn in into Medusa products. Built with Medusa UI, OpenAI, and Vercel AI SDK.
Disclaimer: this code is the result of my experimentation, and is provided as-is. It's by no means optimized or actively maintained.
ai-importer.mp4
- This widget requires an OpenAI platform account and API key. Go to https://platform.openai.com/account/api-keys to set this up.
- You need a valid Medusa database. The fastest way to set this up is by using create-medusa-app.
- Clone repo and install dependencies.
- In your
.env
file, add anOPENAI_API_KEY
environment variable containing your API key, and link your database:
OPENAI_API_KEY=<YOUR OPENAI API KEY>
DATABASE_URL=<YOUR MEDUSA DB URL>
- Start your dev server and log into the admin. You'll find the importer on the settings page under 'extensions'!