Integration Module 2.0 for Medusa is outRead the announcement
Greta medusa plugin logo

Greta medusa plugin

Sync published Medusa products with Greta and receive safe draft products.

npm install @questlabs/greta-medusa-plugin
Category
Built by
Version
0.1.0
Last updated
2 months ago
Monthly downloads
Loading downloads

Greta Medusa Plugin

connects a Medusa v2 store to Greta's CMS connector API. It syncs published products as discoverable content and can import Greta work as unpublished Medusa product drafts. It never publishes or updates an existing product.

Requirements

  • Medusa v2.3 or newer (tested against 2.21.2) and Node.js 20 or newer.
  • A Greta project connection created for platform .
  • Enable that connection in Greta before the plugin can sync. Keep the one-time connector key in the Medusa server/worker environment, never in storefront code.

Install

Add this entry to the array in your existing :

Set these environment variables in both the server and worker deployment (scheduled jobs run in the worker):

The plugin runs its published-product sync hourly. The connection must already be enabled in Greta. No products, credentials, or draft content are read until and a valid connector key are set.

Product sync

The plugin queries Medusa products using and sends only the product ID, title, handle, subtitle, description, and update timestamp. It does not send prices, inventory, customer/order data, images, or unpublished products. The default canonical URL is ; set to the public storefront origin.

Greta drafts

Draft import is opt-in. Enable only when you want Greta content delivered to Medusa as catalog drafts. Products are created with , a deterministic handle, and an idempotency marker. A repeated delivery reuses the matching draft rather than creating another product. The connector never changes status to published. Draft delivery also requires the Greta key to have and scopes.

Safety and operation

  • Sync and draft import are disabled by default.
  • HTTPS is required except on localhost development URLs.
  • The API key is sent only from the Medusa server/worker to Greta.
  • Sync includes only explicitly selected published product fields.
  • Draft creation is off unless separately enabled and creates reviewable drafts only.
  • This plugin does not publish products, mutate existing products, or handle store/customer/order data.
  • If Medusa runs separate server and worker processes, configure the same environment variables in the worker; the scheduled job does not run in a server-only worker mode.

Build before publishing:

The connection, content-sync, and draft-delivery endpoints are provided by Greta's CMS connector service.