younifyd
Menu

pageUpdate

Updates an existing page's content and settings. For example, merchants can update their "Shipping Policy" page when rates change, or refresh their "About Us" page with new team information.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the pageUpdate action (under Page).
  3. Fill in the fields below, then reference the result from later steps as {{pageupdate.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 PageUpdate($id: ID!, $page: PageUpdateInput!) {
  pageUpdate(id: $id, page: $page) {
    page {
      body
      bodySummary
      createdAt
      defaultCursor
      handle
      id
      isPublished
      publishedAt
      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 page to be updated.

pageobjectrequired

The properties of the page to be updated.

handlestring
bodystring
isPublishedboolean
publishDatestring
templateSuffixstring
metafieldsarray<object>5 fields
titlestring
redirectNewHandleboolean
json
{
  "id": "string",
  "page": {
    "handle": "string",
    "body": "string",
    "isPublished": false,
    "publishDate": "string",
    "templateSuffix": "string",
    "metafields": [
      {
        "id": "string",
        "namespace": "string",
        "key": "string",
        "value": "string",
        "type": "string"
      }
    ],
    "title": "string",
    "redirectNewHandle": false
  }
}

Response

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

pageobject
bodystring
bodySummarystring
createdAtstring
defaultCursorstring
handlestring
idstring
isPublishedboolean
publishedAtstring
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?