Menu
sitemap
Returns sitemap data for a specific resource type, enabling headless storefronts to generate XML sitemaps for search engine optimization.
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the sitemap action (under Sitemap).
- Fill in the fields below, then reference the result from later steps as
{{sitemap.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 Sitemap($type: SitemapType!) {
sitemap(type: $type) {
pagesCount {
count
precision
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"type": "PRODUCT"
}
Response
Read the result with {{sitemap.response.data.data.sitemap}}. If the API returns errors, the step fails and they are at {{sitemap.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?