What's your biggest current challenge? Have your say in Community Polls along the right column.

Email not sending after doerer/purchase

Email not sending after doerer/purchase

VicBrew1
Excursionist
41 1 9

VicBrew1_0-1732564452330.png

 

I have this workflow where I want to send a customer and email to book time with me on candidly. The problem is that I am not receiving an email even if the person is subscribed. I checked to make sure the workflow is active and running. Any suggestions? Any help would be greatly appreciated. 

Store: https://qtupb6-n1.myshopify.com/

 

Replies 8 (8)

paul_n
Shopify Staff
1440 157 333

Do you have a valid query in your "Get order data" action? Can you show the run detail page for one of the runs? Does it show that it found orders?

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
VicBrew1
Excursionist
41 1 9

UPDATE: It is sending the emails at 12am for each order now but unfortunetly once each day instead of just once per order. Any ideas on how to fix this? 

VicBrew1_0-1733257696655.png

VicBrew1_1-1733257866832.png

I think my problem is here where it's grabbing the customer ID and not the Order ID. That's only half the battle as I have to figure out how to make it only emil once per order ever. 

VicBrew1_2-1733258018088.png

 

 

 

paul_n
Shopify Staff
1440 157 333

You are getting orders created in the last day. So it's going to send the email for each of those orders. It may not send for all of them, if there are more than 100, or if the Marketing Email blocks sending for some reason to the same customer. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
VicBrew1
Excursionist
41 1 9

but why does it send multiple times. If it's the last day, it should grab those orders once and snd then the next day, if there are no orders it shouldn't send an email. Right now it is sending an email for every order ever made. 

paul_n
Shopify Staff
1440 157 333

That suggests something in the query is off. The Admin API can return "All orders" when the query is invalid. 

 

I'd recommend taking the email out of this for now and use replace it with "log output" so that you don't spam people. You can also use log output to show the query string that you are using (since there are variables it's interpreting).  

 

What query are you using now? It's changed twice above, so I'm not sure what you are using

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
VicBrew1
Excursionist
41 1 9

I'll try log output. Thank you! Right now, this is what I have:

VicBrew1_0-1733428929985.png

I found some code in Shopify's documentation here: https://shopify.dev/docs/api/admin-graphql/2024-10/queries/customers , https://shopify.dev/docs/api/admin-graphql/2024-10/queries/orders

 

paul_n
Shopify Staff
1440 157 333

There's your issue. You enter the query string only there. Flow handles paging, fetching fields, etc. 

 

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
VicBrew1
Excursionist
41 1 9

Ahhhh okay. Thank you very much!!!!