Yes, use the “Refund created” trigger and “Send internal email” action. Some variables to consider for the email body:
Order number: {{order.name}}
Refunded: {{refund.totalRefundedSet.shopMoney.amount}}
Total Price: {{order.totalPriceSet.shopMoney.amount}}
Date refunded: {{refund.createdAt}}
So I set up the Flow with your help and it works. However today I saw that it triggered because of a Voided Order with no transaction. How come? And is it possible to set up a rule that fixes that? Something along the lines of ‘If Voided STOP’.
I’m not sure precisely what you mean by voided. You might have better luck going through support for that so that you can provide links to the voided order and the workflow so they we can see the data in your store. If it was me, I would use GraphiQL to get details about that order and find a variable that captures whether it was “voided”.
Voided isn’t an status that I can see on Orders. Since I don’t see that exact term anywhere I wasn’t sure if you meant something other than “Cancelled”.
There are probably a bunch of ways to detect if no money exchanged hands for a “refund”. The easiest might be to check order / totalRefundedSet / shopMoney / amount > 0