By Greta
Connect Strapi 5 with Greta to sync mapped published content and import Greta-generated content as unpublished drafts.
released September 29, 2026
npm install @questlabs/greta-strapi-plugin@questlabs/greta-strapi-plugin connects a Strapi 5 server to Greta's CMS connector API.
It syncs only content types and fields that you explicitly map, and can create
Greta-generated content as an unpublished Strapi draft. It never publishes or
updates an existing entry.
strapi.npm install @questlabs/greta-strapi-pluginAdd the plugin configuration to config/plugins.ts (or config/plugins.js):
export default ({ env }) => ({
greta: {
enabled: env.bool("GRETA_CMS_ENABLED", false),
config: {
enabled: env.bool("GRETA_CMS_ENABLED", false),
apiUrl: env("GRETA_CMS_API_URL", "https://app.greta.sh/api/greta/cms"),
apiKey: env("GRETA_CMS_API_KEY", ""),
syncIntervalMs: env.int("GRETA_CMS_SYNC_INTERVAL_MS", 3600000),
// Explicit allowlist: don't sync fields you have not reviewed.
contentTypes: env.json("GRETA_STRAPI_CONTENT_TYPES", [
{
uid: "api::article.article",
contentType: "article",
titleField: "title",
slugField: "slug",
bodyField: "body",
excerptField: "excerpt",
pathPrefix: "/blog",
},
]),
siteUrl: env("GRETA_CMS_SITE_URL", ""),
drafts: {
enabled: env.bool("GRETA_STRAPI_IMPORT_DRAFTS", false),
contentTypeUid: "api::article.article",
titleField: "title",
bodyField: "body",
slugField: "slug",
pathPrefix: "/blog",
},
},
},
});Set the key and settings in the Strapi server's secret environment, not in the admin frontend:
GRETA_CMS_ENABLED=true
GRETA_CMS_API_KEY=grc_sk_... # generated once by Greta for this Strapi site
GRETA_CMS_API_URL=https://app.greta.sh/api/greta/cms
GRETA_CMS_SITE_URL=https://www.example.com
GRETA_CMS_SYNC_INTERVAL_MS=3600000
GRETA_STRAPI_IMPORT_DRAFTS=falseRestart Strapi after changing plugin config. The connector checks its Greta
connection on startup and on the configured interval. It sends only the mapped
content fields and only entries queried with Strapi's status: "published".
Draft import is opt-in. Enable GRETA_STRAPI_IMPORT_DRAFTS, grant this key the
draft:pull and draft:ack scopes, and configure a destination collection with
Draft & Publish enabled. Greta items are created with status: "draft"; a
stable generated slug makes retries idempotent. The plugin acknowledges the
draft to Greta only after Strapi confirms it exists. Failed drafts remain
visible for a manual retry in Greta.
The connection, content-sync, and draft-delivery endpoints are provided by Greta's CMS connector service.
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
