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
- Add a step and choose the Shopify connector.
- Pick the blogCreate action (under Blog).
- 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.
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.
{
"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}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?