Shopify Flow and GraphQL Admin API
Flow uses the Shopify GraphQL Admin API to build automations and integrations that extend and enhance the Shopify admin. Flow uses version 2026-01 of the API to evaluate conditions and variables in workflows as well as take actions in your Shopify store. Because Flow accesses store data by calling the API, you have access to nearly all the fields available in the API from Flow.
Because Shopify releases new API versions every 3 months, some workflows might need to be updated when fields are changed or deprecated.
Using GraphQL Admin API in workflows
Most actions in Flow use the GraphQL Admin API to make changes to your Shopify store. For example, the Add order tags action uses the tagsAdd mutation. The Send Admin API request action can use most mutations, including those not yet available as actions in Flow.
As you create workflows, you will often encounter field names and descriptions based on the GraphQL Admin API syntax. For example, to determine the total sellable quantity of a variant in a workflow, you would use the variants_item.inventoryQuantity variable. For another example, to determine the location where a customer subscribed to your email newsletter, you would use the emailSubscriptionMethod variable.
You don't need to be proficient with the API to create workflows with the Flow app, but understanding a bit about variable names and their definitions can help you build the specific workflow logic that you want. For example, knowing the difference between a customer's displayName and their firstName can help your workflow access the correct data depending on what you want to use it for. Definitions are included with each variable as you build your workflow, and you can click to learn more about any variable or definition.
Store data and GraphQL Admin API
Workflows use data from your store in conditions and actions. Flow accesses store data using the GraphQL Admin API, which means you have access to nearly all the fields in the API. If an action doesn't have the necessary data provided by the trigger or a Get data action, then the workflow doesn't run and an error message is displayed.
For example, a workflow starts with a Customer created trigger and imports customer data into the workflow. If that trigger is followed with an Add order tags action, which requires order data and not customer data, then the workflow will result in a missing data error.
You might need to preview data or review the API documentation to understand what is outputted by the API and used in Flow, and to ensure that your workflow outputs the data that you expect.
Field arguments and GraphQL Admin API
Some GraphQL Admin API fields require arguments, additional parameters that narrow down what data is returned. For example, the product.inCollection field needs a collection id argument to know which collection to check. Without it, the field can't return a result.
In Flow, you can create variables from these fields by providing the required argument value, which can then be used in the workflow. You can also assign a custom name to the variable to make it easier to reference in subsequent steps, for example, naming product.inCollection(id: "gid://shopify/Collection/123456") as product.inSummerBestsellers.
Learn more about creating variables from fields with arguments.
Creating variables from metafields require additional information in Flow because you define each metafield's namespace and key yourself, so the arguments are always unique to your store. Learn more about metafields in Flow.
API versioning
Shopify releases new API versions every 3 months and Flow adopts new versions as soon as possible, but might be behind the latest version. When possible, changes between versions are resolved automatically, but some changes might not be straightforward, including any of the following situations:
- When fields are removed but no replacement is provided, potentially affecting how conditions or Liquid are evaluated.
- When fields become nullable, potentially affecting how conditions or Liquid are evaluated.
- When enum values change or new union or interface types are added, potentially affecting Liquid or code.
- When mutation arguments change, potentially affecting the configuration of Send Admin API request actions.
Some workflows might need to be updated manually. In these cases, workflows might display an Update required or Unsupported API error and guide you to the relevant API documentation to make the required changes in the workflow editor. When these updates are completed and saved, the workflow automatically updates to use the latest API version available in Flow.
You can choose to ignore issues temporarily to make urgent changes to a workflow with API version compatibility errors. If these issues aren't addressed, then the workflow might cease to run or cause errors when the older API version is no longer supported by Shopify.