I need to retrieve product metafield data from AdminAPI for usage in microsoft cloud office. A Shopify connector exists, but cannot provide this data.
I have spent several full days trying to get a GraphQL query to work from within Power Automate and always get errors 400 or 415, even with the simplest possible shopify query example.
I can’t find any examples of others attempting to do this online.
I asked 3 LLM’s for ideas and they made great step by step guides, but unfortunately they also didn’t work.
Example of HTTP action fields that should be correct…?
This might be the data that the HTTP action is sending…?
( i was trying different content types to see if that helped, after reading
GraphQL Over HTTP )
Not sure what to try next, any advice appreciated 
Are you sending a query and variables as well?
I was doing so until shortly before making this post. I removed the query from the body in case that made any difference to errors, but it didn’t.
eg i tried things like:
query {
shop {
name
email
}
}
Can you try the following:
URL: (Assuming this is your store id from the screenshot)
https://uy0jt5-hp.myshopify.com/admin/api/2025-07/graphql.json
Headers:
Content-Type: application/json
X-Shopify-Access-Token: {access_token}
Body:
{“query”:“query {\n shop {\n name\n }\n}”}
I’m guessing you are using a custom app for this?
If so please ensure the app is installed and the token used is this one
I tried it, it gave me error 400, bad request
{
"statusCode": 400,
"headers": {
"Date": "Wed, 09 Jul 2025 04:36:59 GMT",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
"x-sorting-hat-podid": "236",
"x-sorting-hat-shopid": "75270815981",
"X-Request-ID": "612c817a-6969-4f7c-88fd-1b994eba3b53-1752035819",
"Server-Timing": "processing;dur=7,cfRequestDuration;dur=254.999876",
"X-Content-Type-Options": "nosniff",
"x-download-options": "noopen",
"x-permitted-cross-domain-policies": "none",
"X-XSS-Protection": "1; mode=block",
"x-dc": "gcp-us-central1,gcp-us-central1,gcp-us-central1",
"Alt-Svc": "h3=\":443\"",
"cf-cache-status": "DYNAMIC",
"Report-To": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=Jc3ckwWFAU1kJBMIRovX2ovEzkBQFe6n4QkLE9aoSxX8dX9T8mC%2FXfXM4iZGIg0Za0HwF1guRT84KkH%2BxLGmrnf%2BE7ZBOBzn2JFN3Yqc73WrHruJ97v54DzPGBXcbPcyaOtQX%2FsQrZtt\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
"NEL": "{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}",
"Shopify-Edge-Ip": "23.227.38.74",
"Server": "cloudflare",
"CF-RAY": "95c51f9fddc52e6e-MEL",
"Content-Type": "text/plain",
"Content-Length": "11"
},
"body": "Bad Request"
}
Can you share a screenshot of what you’ve setup? Excluding your access token please
Trying exactly as you described would not pass the built-in json validation i guess, and it wouldn’t even let me save & test the connection:
It also doesn’t pass other json validation and my attempts to fix it manually didn’t help
So when i tried it yesterday i must have been mistaken, it probably had used a previous query somehow and given error 400 from that.
However i just tried it with similar formatting i saw here
{
"query": "query ($id: ID!) {\n user(id: $id) {\n name\n }\n}",
"variables": {
"id": "QVBJcy5ndXJ1"
}
}
And for the first time ever, it worked! As in, I have moved on to error 200! Which i think means i just asked for data that doesnt exist.
So we are on the right track! Now i just need to write my own query that actually works with shopify i think 
Oh great! glad it worked. Can you get it to send just the raw body, without trying to parse or validate the JSON? 
you cannot, Power Automate will not allow you to even “save” your work until the Body is either valid or empty 
Ah okay, I was looking it up on forms and it suggested there was a way.
Because I suspect part of the issue was power automate messing around with the body, especially as the graphql contains brackets etc