Stop strapi from automatically publishing?

Hi there,

maybe I’m blind, but how exactly can I tell Strapi not to publish when I’m creating entries via functions? I just want to import data from an external source and save them as a draft. Those entries have to be reviewed and then published by hand.

So far i’ve tried “status” and “_publicationState”, but apparently it doesn’t work.

await (element) => {
  await strapi.query('partner').create({
    name: element.programName,
    _publicationState: 'preview'

Don’t mind the stuff. Still working on it. :smiley:

1 Like

I’m having the same issue! Could you find a way? @BlindPenguin

I just found a way!

Just pass the field “published_at” as NULL and it will be automatically saved as a draft :smiley:


await this.$strapi.create("comments", {
    article: this.article,
    description: this.description,
    **published_at: null,**