Menu
metaobject
Retrieves a single Metaobject by either its global ID or its handle. Note: When using the handle, you must also provide the metaobject type because handles are only unique within a type.
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the metaobject action (under Metaobject).
- Fill in the fields below, then reference the result from later steps as
{{metaobject.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.
query Metaobject($id: ID, $handle: MetaobjectHandleInput) {
metaobject(id: $id, handle: $handle) {
fields {
key
reference
type
value
}
handle
id
onlineStoreUrl
seo {
description {
key
reference
type
value
}
title {
key
reference
type
value
}
}
type
updatedAt
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"id": "string",
"handle": {
"handle": "string",
"type": "string"
}
}
Response
Read the result with {{metaobject.response.data.data.metaobject}}. If the API returns errors, the step fails and they are at {{metaobject.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?