younifyd
Menu

articles

Returns a paginated list of Article objects from the shop's Blog objects. Each article is a blog post containing content, author information, tags, and optional images.

Use it in a workflow

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

Query

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

graphql
query Articles($first: Int, $after: String, $last: Int, $before: String, $reverse: Boolean, $sortKey: ArticleSortKeys, $query: String) {
  articles(
    first: $first
    after: $after
    last: $last
    before: $before
    reverse: $reverse
    sortKey: $sortKey
    query: $query
  ) {
    edges {
      cursor
      node {
        author
        authorV2
        blog
        contentHtml
        excerptHtml
        handle
        id
        image
        onlineStoreUrl
        publishedAt
        seo
        tags
        title
        trackingParameters
      }
    }
    nodes {
      author {
        bio
        email
        firstName
        lastName
        name
      }
      authorV2 {
        bio
        email
        firstName
        lastName
        name
      }
      blog {
        authors
        handle
        id
        onlineStoreUrl
        seo
        title
      }
      contentHtml
      excerptHtml
      handle
      id
      image {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      onlineStoreUrl
      publishedAt
      seo {
        description
        title
      }
      tags
      title
      trackingParameters
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}

Variables

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

firstnumber

Returns up to the first `n` elements from the list.

afterstring

Returns the elements that come after the specified cursor.

lastnumber

Returns up to the last `n` elements from the list.

beforestring

Returns the elements that come before the specified cursor.

reverseboolean

Reverse the order of the underlying list.

sortKeystring

Sort the underlying list by the given key.

One ofTITLEBLOG_TITLEAUTHORUPDATED_ATPUBLISHED_ATIDRELEVANCE

querystring

Apply one or multiple filters to the query. | name | description | acceptable_values | default_value | example_use | | ---- | ---- | ---- | ---- | ---- | | author | | blog_title | | created_at | | tag | | tag_not | | updated_at | Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.

json
{
  "first": 0,
  "after": "string",
  "last": 0,
  "before": "string",
  "reverse": false,
  "sortKey": "TITLE",
  "query": "string"
}

Response

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

edgesarray<object>
cursorobject
nodeobject
nodesarray<object>
authorobject
authorV2object
blogobject
contentHtmlobject
excerptHtmlobject
handleobject
idobject
imageobject
onlineStoreUrlobject
publishedAtobject
seoobject
tagsobject
titleobject
trackingParametersobject
pageInfoobject
endCursorstring
hasNextPageboolean
hasPreviousPageboolean
startCursorstring

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

Was this page helpful?
articles — Shopify Storefront — Documentation