Hi everyone,
I’m trying to create discount codes automatically using Shopify Flow with the “Send Admin API request” action and the discountCodeBasicCreate mutation.
However, I’m getting this error:
“La mutación ‘discountCodeBasicCreate’ no existe en la versión unstable de la API”
According to the official GraphQL documentation, this mutation exists and should work, but Flow seems to be using the “unstable” API version.
My questions:
-
Is there a way to specify the API version in Shopify Flow’s “Send Admin API request” action?
-
Has anyone successfully created discount codes via Flow using this mutation?
-
Is there an alternative approach to programmatically create discount codes from Flow?
What I’m trying to achieve:
-
Trigger: Customer abandons checkout
-
Action 1: Save abandoned cart products to customer metafield (this works)
-
Action 2: Create a discount code with expiration date (this fails)
-
Action 3: Send email with the discount code
Any help would be greatly appreciated!
Thanks!
