• Skip to primary navigation
  • Skip to main content
pragati logo

Pragati Tech Services

  • Home
  • About
  • Services
    • Ecommerce Solutions
    • Back Office Support
    • Business Central
    • Customer Support
  • Blog
  • Contact
  • Show Search
Hide Search
You are here: Home / Archives for Shopify integration

Shopify integration

How to Sync Business Central to Shopify with Power Automate

Najama · October 27, 2026 ·

Want to sync Business Central to Shopify without writing any code or paying for custom development? You can do it with Power Automate.

Business Central already has a standard Shopify connector, but it has some limitations, so we explored a new option. In this post we explain what the standard connector does and doesn’t do, how our solution works, how to build every step, and what to consider before going live.

What the Standard Shopify Connector Does (and Doesn’t)

Business Central has a built-in Shopify connector. It handles the main jobs well:

  • Syncing items and products between Business Central and Shopify
  • Sending inventory levels to Shopify
  • Importing Shopify orders as sales orders

But it doesn’t cover everything. In our case, we needed the outer (carton) quantity from each item’s unit of measure in Business Central to appear in Shopify. The standard connector doesn’t send that value to a Shopify field for you, and the usual answer is custom development. Instead, we built a flow with Power Automate.

How to Sync Business Central to Shopify with Power BI and Power Automate

The flow uses Business Central, Power BI and Power Automate together:

Business Central → Power BI → Power Automate → Shopify

Power BI reads the data from Business Central using your normal organisational login, so there is no app registration or developer involved. Power Automate then runs a scheduled flow that reads the Power BI data and pushes it to Shopify through the Shopify Admin GraphQL API, updating a variant metafield and matching on Item No. = SKU.

Before You Start

  • Power BI dataset with your Business Central data, refreshing on a schedule. In this example the table is Query1 with the columns Item_No, Code and Qty_per_Unit_of_Measure (yours will differ).
  • Shopify app from the Shopify Dev Dashboard with the scopes read_products and write_products. Copy its Client ID and Client secret. See Shopify’s guide to the client credentials grant.
  • Shopify metafield with namespace custom, key outer_qty and type integer.
  • Power Automate premium licence, because the HTTP action is a premium connector.
  • A test store. Always test there first, never on live products.

Part 1: Connect Power BI to Business Central

  1. In Power BI Desktop, connect to Business Central with the Business Central connector, choose your company and the table that holds the data you need, and load it.
  2. Check that the item numbers and quantities look right.
  3. Publish the model to the Power BI service, then sign in to the data source in the dataset’s settings and set up a scheduled refresh.

Part 2: Build the Power Automate Flow for Shopify

The finished flow looks like this:

Power Automate flow syncing Business Central data to Shopify

Step 1: Recurrence (the trigger)

Create a Scheduled cloud flow and set the interval you need, for example once a day. Schedule it to run after the Power BI dataset refresh finishes, because the flow can only send data that is already in the dataset. While you are building, you can use Manually trigger a flow and switch to Recurrence later.

Step 2: Get token (HTTP)

Add the premium HTTP action and rename it Get token. This action requests the access token that every call to the Shopify Admin API needs. The name matters, because later steps refer to it.

  • Method: POST
  • URI: https://YOUR-STORE.myshopify.com/admin/oauth/access_token
  • Headers: Content-Type = application/json
  • Body:
{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "grant_type": "client_credentials"
}

Later steps read the token with body(‘Get_token’)?[‘access_token’] (the space in the action name becomes an underscore). This action requests an access token that every call to the Shopify Admin API needs.

Get token HTTP action in Power Automate requesting a Shopify access token

Step 3: Run a query against a dataset (Power BI)

Add the Power BI action Run a query against a dataset, choose your Workspace and Dataset, and paste this DAX into Query text. Microsoft explains this action in its post on running queries against Power BI datasets in Power Automate.

EVALUATE
SELECTCOLUMNS(
  FILTER(
    Query1,
    Query1[Code] = "OUTER" && Query1[Item_No] <> ""
  ),
  "ItemNo", Query1[Item_No],
  "OuterQty", Query1[Qty_per_Unit_of_Measure]
)

This returns the item number and outer quantity for every item. First test tip: add && Query1[Item_No] = “30452” so the flow only touches one item, then remove it later.

Power Automate Run a query against a dataset step reading Business Central data from Power BI

Step 4: Apply to each

Add Control → Apply to each. In Select an output from previous steps, open the fx (expression) tab and enter:

first(body(‘Run_a_query_against_a_dataset’)?[‘results’])?[‘tables’][0]?[‘rows’]

In the loop’s Settings, turn on Concurrency control and set the degree of parallelism to 1.

Apply to each loop using Power BI query results in a Power Automate flow

Step 5: Find variant (inside the loop)

Add an HTTP action named Find variant. This Power Automate Shopify GraphQL query calls the Shopify Admin API to look up the variant by SKU.

  • Method: POST
  • URI: https://YOUR-STORE.myshopify.com/admin/api/2026-01/graphql.json
  • Headers:
    • Content-Type = application/json
    • X-Shopify-Access-Token = the expression body(‘Get_token’)?[‘access_token’]
  • Body:
{
  "query": "{ productVariants(first: 1, query: \"sku:'@{items('Apply_to_each')?['[ItemNo]']}'\") { nodes { id sku } } }"

}
Find variant HTTP action in Power Automate with a Shopify GraphQL query

If @{…} shows as plain text after saving, delete it and insert it again from the fx tab as items(‘Apply_to_each’)?[‘[ItemNo]’]. Shopify returns the variant’s id, or an empty list if no variant has that SKU.

Step 6: Condition (inside the loop)

Not every Business Central item exists in Shopify. Add Control → Condition under Find variant so the flow only updates items it actually found.

Condition step checking whether a Shopify variant was found
  • Left value (fx): length(body(‘Find_variant’)?[‘data’]?[‘productVariants’]?[‘nodes’])
  • Operator: is greater than
  • Right value: 0

In advanced mode this is:

@greater(length(body('Find_variant')?['data']?['productVariants']?['nodes']), 0)

If True, continue to the next step. If False, the item is skipped.

Step 7: Set outer qty (the True branch)

To update the Shopify metafield with Power Automate, add an HTTP action named Set outer qty, with the same method, URI and headers as Find variant. It calls the Shopify Admin API using the metafieldsSet mutation:

{

  "query": "mutation($m: [MetafieldsSetInput!]!) { metafieldsSet(metafields: $m) { metafields { key value } userErrors { field message } } }",
  "variables": {
    "m": [{
      "ownerId": "@{body('Find_variant')?['data']?['productVariants']?['nodes']?[0]?['id']}",
      "namespace": "custom",
      "key": "outer_qty",
      "type": "number_integer",
      "value": "@{items('Apply_to_each')?['[OuterQty]']}"
    }]
  }
}
Set outer qty HTTP action updating a Shopify metafield

After each run, check that userErrors is empty (userErrors: []). Shopify can reject a value even when the request itself succeeds.

Part 3: Test It Safely

  1. On your test store, use the single-item filter from Step 3, then choose Test → Manually → Run flow.
  2. Open the run and check each action: the token worked, the query returned your row, a variant was found, and userErrors is empty.
  3. In Shopify, confirm the metafield matches Business Central.
  4. Remove the filter and run the full list.

Before Going Live

  • It isn’t real time. A change in Business Central reaches Shopify only after the Power BI refresh and the next flow run, so schedule the flow after the refresh.
  • Watch for failed refreshes. If a refresh fails, the flow reads old data, so monitor your refreshes and runs.
  • Check licences and limits. Power BI refresh limits and the licences for the Power BI connector and HTTP action depend on your plan, so confirm them before you build.

Frequently Asked Questions

Do I need to write code or hire a developer?

No. The flow uses standard Power BI and Power Automate actions. You only copy the queries shown above.

Can I update a Shopify metafield with Power Automate for something other than outer quantity?

Yes. Change the DAX query to return the columns you need, and change the namespace, key and type in Step 7. Create the matching metafield in Shopify first. For help with other fields, talk to our Business Central support team.

Will Shopify update immediately when Business Central changes?

No. It updates after the next Power BI refresh and flow run.

Need Help With Your Business Central Shopify Integration?

Pragati Tech Services is a boutique agency in Nagpur, India that helps SMEs in Australia and the UK setup eCommerce stores using Shopify and WooCommerce. We also help businesses connect Business Central and their Shopify stores so product data stays accurate without manual work. Get in touch to talk about your setup.

Pragati Tech Services

Copyright © 2026