What email app would let me send a discount code from a CSV after variant purchase?

Topic summary

Goal: Send a unique discount code via email when customers buy Variant A of a product, pulling codes from a CSV, with an iterator to ensure each code is used once. The discount applies to a partner’s non-Shopify store, so Shopify-native code generation isn’t viable.

Constraints: Klaviyo was evaluated but lacks the needed granularity for this per-variant, external-code workflow. Codes must be read from a CSV and tracked to avoid reuse.

Proposed solutions:

  • Build an automation workflow using a Shopify automation app (e.g., Mesa) to detect Variant A purchases, select the next unused code from the CSV, and email it.
  • Use an integration platform (e.g., Zapier) to trigger on Variant A orders, read the next code from a CSV stored in Google Sheets, and send an email through the chosen email service.

Key technical notes: “Variant” refers to product options in Shopify; an “iterator” is needed to assign unique codes sequentially from the list and mark them as used.

Status: No confirmed implementation yet; viable approaches identified via Mesa or Zapier + Google Sheets + email platform. Open items: choose a platform and confirm code tracking/uniqueness handling.

Summarized with AI on January 10. AI used: gpt-5.

I have a very specific use-case for the app I need.

I have a product with two variants, A and B. If the customer purchases variant A, we would like them to receive an email with a discount code that is taken from a .CSV file with discount codes in it. There needs to be an iterator attached so that we are always sending a unique discount code.

I am working with another business and the discount codes are for a product for their business. So far the only solution we have found to give customers of my store a discount code for their store would be to create a .CSV file of various discount codes. They are not on Shopify, they do their own hosting.

I’ve looked through Klaviyo but it does not seem granular enough to fit my use case. Are there any other ways that we could achieve our use case?

Thank you.

I should be able to build out an automation workflow for this using our app mesa if you’re interested.

Hi @RoarLittleLions

You can consider integrating your Shopify store and email platform with automation platforms like Zapier.

You could set up a scenario that triggers when Variant A is purchased, reads a code from your .CSV file (stored in a service like Google Sheets), and then sends an email through your email platform.

I hope that this helps!

1 Like