younifyd
Menu

blogCreate

Creates a new blog within a shop, establishing a container for organizing articles. For example, a fitness equipment retailer launching a wellness blog would use this mutation to create the blog, enabling them to…

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the blogCreate action (under Blog).
  3. Fill in the fields below, then reference the result from later steps as {{blogcreate.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation BlogCreate($blog: BlogCreateInput!) {
  blogCreate(blog: $blog) {
    blog {
      commentPolicy
      createdAt
      feed {
        location
        path
      }
      handle
      id
      tags
      templateSuffix
      title
      updatedAt
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

blogobjectrequired

The properties of the new blog.

handlestring
templateSuffixstring
metafieldsarray<object>5 fields
commentPolicystring

One ofAUTO_PUBLISHEDCLOSEDMODERATED

titlestringrequired
json
{
  "blog": {
    "title": "string",
    "handle": "string",
    "templateSuffix": "string",
    "metafields": [
      {
        "id": "string",
        "namespace": "string",
        "key": "string",
        "value": "string",
        "type": "string"
      }
    ],
    "commentPolicy": "AUTO_PUBLISHED"
  }
}

Response

Read the result with {{blogcreate.response.data.data.blogCreate}}. If the API returns errors, the step fails and they are at {{blogcreate.response.data.errors}}.

blogobject
commentPolicystring

One ofAUTO_PUBLISHEDCLOSEDMODERATED

createdAtstring
feedobject2 fields
handlestring
idstring
tagsarray<object>
templateSuffixstring
titlestring
updatedAtstring
userErrorsarray<object>
codeobject
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.

Was this page helpful?