How to upload an image file to a Shopify order (write_files scope missing in the Make connection)?

:bullseye: What is your goal?

Hi,

I am building a scenario that reads a packing slip photo from Google Drive, reads the order number with Gemini, finds the order in Shopify, and attaches the actual photo to that order. Today our team does this by hand by pasting the photo into the order page.

My setup:

  • Shopify store with the standard Make connection (already has read and edit access for orders and products: read_orders, write_orders, read_all_orders, read_products, write_products)
  • Order metafield custom.carton_photos (type: file, list) to hold the photos
  • Planned steps: Shopify GraphQL stagedUploadsCreate, HTTP upload to the returned URL, fileCreate, then metafieldsSet on the order

:thinking: What is the problem & what have you tried?

Problem:
stagedUploadsCreate fails with “The Shopify connection lacks permission for this upload action.” The Scopes list in the standard connection (Advanced settings) has no write_files or read_files, so I cannot add them. Order queries work fine.

:clipboard: Error messages or input/output bundles

Questions:

  1. Has anyone uploaded a file to Shopify Files and attached it to an order metafield from Make? Which connection type did you use to get write_files?
  2. Does a Shopify Dev Dashboard app (Client ID and Client secret in the connection’s Advanced settings) work for this? Did you need extra settings, like the redirect URL https://www.integromat.com/oauth/cb/shopify/?
  3. Is there a simpler way to attach an image file to an order that I am missing?

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

The standard Shopify connection can’t get write_files, so the upload has to go through your own app. What works:

  1. In the Shopify Dev Dashboard, create an app for your store with the scopes write_files, read_files, read_orders, write_orders, and install it on the store. Use the app’s Client ID and Client secret in the Make Shopify connection’s Advanced settings, add the redirect URL https://www.integromat.com/oauth/cb/shopify/ in the app’s settings, and reconnect. The new connection then carries write_files.
  2. You can skip stagedUploadsCreate and the HTTP upload: fileCreate accepts an external URL as originalSource, and Shopify fetches the image itself. The URL must be a direct, publicly readable file link (for a Google Drive file, a direct-download link of a file shared with “anyone with the link”; a normal Drive preview link will not work).
  3. fileCreate returns the file id while processing. Poll the file until fileStatus is READY, then run metafieldsSet on the order with that id in custom.carton_photos (a list.file_reference metafield takes a JSON list of file GIDs).

If you prefer to keep the staged upload, step 1 is still what fixes the permission error; the rest of your plan is right.

The error occurs because Make’s default multi-tenant Shopify app does **not** include the `write_files` (or `read_files`) OAuth scopes in its registered manifest. Because these scopes are not part of Make’s shared application, you cannot select or inject them into the standard connection.

To bypass this restriction and attach files seamlessly, here is the exact architecture you need to implement.


Step 1: Create a Custom App in Shopify Admin (No Partner Account Needed)

Instead of dealing with OAuth redirect callbacks, generate a direct Admin API Access Token:

  1. In your Shopify Admin, navigate to **Settings** > **Apps and sales channels** > **Develop apps**.
  2. Click **Create an app** (e.g., name it `Make File Ingestion`).
  3. Under **Configuration** > **Admin API integration**, select the following scopes:
    • `write_files` & `read_files`
    • `write_orders` & `read_orders`
  4. Click **Save**, then click **Install app**.
  5. Reveal and copy your **Admin API access token** (it starts with `shpat_…`). Store it securely.

Step 2: Streamline File Uploading in Make

If your file in Google Drive can be fetched as a direct download link (or via an accessible web link), Shopify’s GraphQL API can ingest it directly using `fileCreate(files: [{ originalSource: $url, contentType: IMAGE }])`. This completely eliminates the need for the complex 3-step staged upload (`stagedUploadsCreate` → binary HTTP upload → `fileCreate`).

If your file is private and cannot be exposed via a direct link, you can still execute the 3-step `stagedUploadsCreate` flow via the native HTTP module using your direct `shpat_…` token.


Step 3: Configure the Make HTTP Module

In Make, replace the default Shopify module with the native **HTTP - Make a request** module:

  • **URL**: `[https]://your-shop-name[.]myshopify[.]com/admin/api/2024-04/graphql.json`
  • **Method**: `POST`
  • **Headers**:
    • `Content-Type`: `application/json`
    • `X-Shopify-Access-Token`: `shpat_your_token_here`

Mini-Patch JSON / Code snippet ready to copy:

```json
{
“query”: “mutation fileCreate($files: [FileCreateInput!]!) { fileCreate(files: $files) { files { id alt createdAt fileStatus … on GenericFile { url } … on MediaImage { image { url } } } userErrors { field message } } }”,
“variables”: {
“files”: [
{
“alt”: “Packing slip photo”,
“contentType”: “IMAGE”,
“originalSource”: “[https]://drive[.]google[.]com/uc?export=download&id=YOUR_DRIVE_FILE_ID”
}
]
}
}
```

*(Note: Replace `[https]://drive[.]google[.]com/…` with your actual defanged download link pattern or mapped variable from your Google Drive module).*


Step 4: Attach the Resulting File GID to the Order Metafield

Once `fileCreate` runs, Shopify returns a File ID (`gid://shopify/MediaImage/123456789`). You then execute `metafieldsSet` on the order using another GraphQL call in Make:

```json
{
“query”: “mutation metafieldsSet($metafields: [MetafieldsSetInput!]!) { metafieldsSet(metafields: $metafields) { metafields { id key value } userErrors { field message } } }”,
“variables”: {
“metafields”: [
{
“ownerId”: “gid://shopify/Order/YOUR_SHOPIFY_ORDER_ID”,
“namespace”: “custom”,
“key”: “carton_photos”,
“type”: “list.file_reference”,
“value”: “[\“gid://shopify/MediaImage/123456789\”]”
}
]
}
}
```

*(Remember that for `list.file_reference`, the `value` must be a stringified JSON array containing the file GIDs).*

If you’d like, I can also share the complete JSON blueprint / flow template with you for free—just let me know and I’ll send it over.

Feel free to post your Google Drive file output bundle or GraphQL response here if you encounter any edge cases while mapping the order ID!

One caution with the direct-URL shortcut: packing slips can contain customer names, addresses and order details. I wouldn’t switch the Drive file to “anyone with the link” just to let fileCreate fetch it. Keep the staged-upload route if the image isn’t meant to be public: download its binary with the authenticated Drive module, then upload that binary using the target URL and parameters returned by stagedUploadsCreate.

Two details for your existing custom.carton_photos design:

  • Wait for the created file to reach READY and check GraphQL userErrors, even when the HTTP status is 200.
  • metafieldsSet replaces the list value; it doesn’t append automatically. Read the current file-reference list, add the new GID once, and write the complete JSON array. Serialize updates per order, or use the API’s supported conflict-control mechanism, so two packing slips don’t overwrite each other.

Also don’t copy the 2024-04 API version from the example unchanged; use a currently supported version and its matching schema. None of these steps removes the need for write_files on the installed connection.

The standard Make connection won’t give you write_files. Create a custom app in Shopify admin with write_files, read_files and write_orders, then call the GraphQL API from an HTTP module using that app’s Admin API access token. The same stagedUploadsCreate, upload, fileCreate and metafieldsSet steps will work from there.

On your question 2: the route in the first answer is the one I’d try first, with three details it leaves out.

  1. Open the Dev Dashboard from your store’s admin (Settings > Apps > Develop apps > Build apps in Dev Dashboard). Since 1 January 2026 Shopify no longer allows new admin-created apps there, so the shpat_ token steps above only work if your store already has one.
  2. Release a version with write_files, read_orders and write_orders, and add the redirect URL you mentioned.
  3. Shopify should take scopes from that version, not from Make’s list, but I haven’t tested this in Make. First run { currentAppInstallation { accessScopes { handle } } } in “Make a GraphQL API call” on the new connection.

Does write_files show up?

Thanks, everyone, for taking the time to respond and share your suggestions. I really appreciate the help

I have one more question regarding the Shopify OAuth setup:

Which exact Redirect URL(s) should I add under Authentication → Redirect URLs in the Dev Dashboard? Is it one of these or do I need to add all three?

Also, does the trailing slash at the end of the URL matter?

Thanks again for your help!

Thanks Thanks for the detailed explanation!

Yes, write_files is showing up in the access scopes along with the other permissions.

However, I’m still facing an issue with the Redirect URL. I added https://www.make.com/oauth/cb/shopify under Authentication → Redirect URLs and released the app version, but when I try to create the connection in Make, I get the following error:

OAuth error invalid_request: The redirect_uri is not whitelisted.

Add this one: https://www.integromat.com/oauth/cb/shopify/. It’s the only Redirect URI on Make’s Shopify page (Shopify - Apps Documentation). I also checked it just now: when I start a Shopify connection with a custom Client ID from my Make account (EU1), Make sends exactly that URL to Shopify, with the / at the end. Only this one is needed. Keeping the make.com one is fine.

On the slash: Shopify says the redirect_uri must “exactly match” one you’ve configured, so /shopify and /shopify/ count as different URLs.

  1. Add the URL above.
  2. Release a new version. Redirect URLs only take effect in a released version.
  3. Create the connection in Make again.

If it still fails, look for redirect_uri= in the popup window’s address bar. The text after it (up to the next &) is the URL Make sent. Change each %3A to : and each %2F to /, then add that URL. Also check that the Client ID in Make is from this same app.

Your screenshot shows write_files on the app version. After connecting, run the currentAppInstallation query on the connection to check it has write_files too.