« tlly.dev

Playbooks · Integrations

Shopify

Read recent orders with the Admin GraphQL API and a read-only app token.

What you can track

Orders in the window the token can see, as a daily sum of totalPriceSet.shopMoney.amount or a daily count. read_orders covers orders created in the last 60 days. Older orders need read_all_orders as well, and that scope has Shopify’s approval rules. tlly does not follow Shopify’s GraphQL cursor (pageInfo.endCursor). One request, first up to the API’s page size, is the whole job. A busy store will be short. For a complete history, push a daily total or use the Sheets template.

Credential

Admin API access token (shpat_…) from a custom app. Minimum scope: read_orders. Add read_products or read_customers only if you chart those. Do not grant write scopes.

Host: the shop’s your-store.myshopify.com (each store is its own host). Suggested name: SHOPIFY_TOKEN.

Where to get it

Shopify admin → Settings → Apps and sales channels → Develop apps. Create “tlly”, Configure Admin API scopes, install, reveal the Admin API access token once. Scopes: access scopes.

tlly job

POST to the GraphQL endpoint is allowed with a stored secret when the path contains graphql and the body is a query (no mutation). The body must be a string so {today} is filled in. The orders example on the docs uses API version 2026-10 and header X-Shopify-Access-Token.

{"series":"shopify_revenue","cron":"0 7 * * *","request":{"url":"https://your-store.myshopify.com/admin/api/2026-10/graphql.json","method":"POST","headers":{"X-Shopify-Access-Token":"{{secret:SHOPIFY_TOKEN}}","Content-Type":"application/json"},"body":"{\"query\":\"query { orders(first: 50, query: \\\"created_at:>={yesterday}\\\") { edges { node { createdAt totalPriceSet { shopMoney { amount currencyCode } } } } } }\"}"},"extract":{"format":"json","items":"data.orders.edges","date":"node.createdAt","value":"node.totalPriceSet.shopMoney.amount","aggregate":"sum"}}

Count the same list with "aggregate":"count" and no value. Drop test orders in the query string (test:false) if the preview includes them.

Gotchas

Alert ideas

Red when yesterday’s order count is zero on a store that normally sells daily. Yellow when revenue is 30% under the previous week (a derived pct_change or a threshold on the level).

Verification

Checked 2026-10-26: orders query, cursor arguments, and the curl to POST /admin/api/2026-10/graphql.json with X-Shopify-Access-Token on the orders page. read_orders is the last 60 days; read_all_orders extends it and does not grant access alone, on the access-scopes page. Money unit is unverified. Abandoned checkouts are not a separate tlly connector.