younifyd
Menu

articleCreate

Creates an Article. Articles are content pieces that include a title, body text, and author information.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the articleCreate action (under Article).
  3. Fill in the fields below, then reference the result from later steps as {{articlecreate.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 ArticleCreate($article: ArticleCreateInput!, $blog: ArticleBlogInput) {
  articleCreate(article: $article, blog: $blog) {
    article {
      author {
        name
      }
      blog {
        commentPolicy
        createdAt
        feed
        handle
        id
        tags
        templateSuffix
        title
        updatedAt
      }
      body
      createdAt
      defaultCursor
      handle
      id
      image {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      isPublished
      publishedAt
      summary
      tags
      templateSuffix
      title
      updatedAt
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

articleobjectrequired

The properties of the new article.

blogIdstring
handlestring
bodystring
summarystring
isPublishedboolean
publishDatestring
templateSuffixstring
metafieldsarray<object>5 fields
tagsarray<string>
imageobject2 fields
titlestringrequired
authorobjectrequired2 fields
blogobject

The properties of the new blog.

titlestringrequired
json
{
  "article": {
    "title": "string",
    "author": {
      "name": "string",
      "userId": "string"
    },
    "blogId": "string",
    "handle": "string",
    "body": "string",
    "summary": "string",
    "isPublished": false,
    "publishDate": "string",
    "templateSuffix": "string",
    "metafields": [
      {
        "id": "string",
        "namespace": "string",
        "key": "string",
        "value": "string",
        "type": "string"
      }
    ],
    "tags": [
      "string"
    ],
    "image": {
      "altText": "string",
      "url": "string"
    }
  },
  "blog": {
    "title": "string"
  }
}

Response

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

articleobject
authorobject1 fields
blogobject9 fields
bodystring
createdAtstring
defaultCursorstring
handlestring
idstring
imageobject7 fields
isPublishedboolean
publishedAtstring
summarystring
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?
articleCreate — Shopify — Documentation