Auto accept returns

Hey I need to write a flow that checks as a trigger has return requested set and then does it by calling Send Admin API request as returnApproveRequest. Unfortunately I have an incorrect json and it shows me an error:/
Is the flow set up correctly or is there an error in the json?
Json looks like that:

{
  "query": "mutation approveReturnRequest($input: ReturnApproveRequestInput!) { returnApproveRequest(input: $input) { return { id status } userErrors { field message } } }",
  "variables": {
    "input": {
      "returnId": "{{ return.id }}"
    }
  }
}

I’m not following your use case, but I’d recommend you remove that JSON and change the mutation to another one and then back to approveReturnRequest. It will populate the JSON to show you exactly the syntax you need (it doesn’t include “query”)

Hi @Arkadiusz_Garzel

Are you still seeing errors after following Paul’s advice above, or can I mark this as solved?

Unfortunately it still doesn’t work.

To get more help, we would need to see the error message or better description of what isn’t working