younifyd
Menu

articleUpdate

Updates an existing Article. You can modify the article's content, metadata, publication status, and associated properties like author information and tags.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the articleUpdate action (under Article).
  3. Fill in the fields below, then reference the result from later steps as {{articleupdate.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 ArticleUpdate($id: ID!, $article: ArticleUpdateInput!, $blog: ArticleBlogInput) {
  articleUpdate(id: $id, 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.

idstringrequired

The ID of the article to be updated.

articleobjectrequired

The properties of the article to be updated.

blogIdstring
handlestring
bodystring
summarystring
isPublishedboolean
publishDatestring
templateSuffixstring
metafieldsarray<object>5 fields
tagsarray<string>
imageobject2 fields
titlestring
authorobject2 fields
redirectNewHandleboolean
blogobject

The properties of the blog to be created.

titlestringrequired
json
{
  "id": "string",
  "article": {
    "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"
    },
    "title": "string",
    "author": {
      "name": "string",
      "userId": "string"
    }
  },
  "blog": {
    "title": "string"
  }
}

Response

Read the result with {{articleupdate.response.data.data.articleUpdate}}. If the API returns errors, the step fails and they are at {{articleupdate.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?