Add a Free Product to Shopify Orders with Specific Discount Codes
Enhance your customer’s shopping experience by including a free product whenever a specific discount code is applied at checkout. This MESA workflow template automatically adds a complimentary item to the order for fulfillment, delighting customers with a special surprise. Encourage conversions and foster loyalty by offering a little extra for those who use your promotional codes.
Trusted by 1,000+ Shopify merchants — from solo operators to scaling brands.

How it works
4 steps to start adding free products to orders when customers use specific discount codes
Order Created
Order Created
Loop over the order's discount codes
Loop over the order's discount codes
Filter for a specific discount code
Filter for a specific discount code
Add Line Item to Order
Add Line Item to Order
Ready to start adding free products to orders when customers use specific discount codes
Get setup in 5 minutes.
Frequently asked questions
What happens if a customer uses the discount code multiple times in separate orders?
Each order triggers the workflow independently, so if a customer places multiple orders using the same discount code, they'll receive the free product with each qualifying order. You can modify the workflow to check customer purchase history if you want to limit the free product to first-time use only.
Will the free product affect my inventory levels?
Yes, the free product gets added as a regular line item with proper inventory tracking. Your stock levels will decrease when the free item is included in orders, so make sure you have adequate inventory of your promotional products.
Can I set different free products for different discount codes?
Currently this workflow handles one discount code and one free product. To offer different free products for different codes, you'll need to create separate workflows or modify the filter step to include multiple conditions with corresponding product selections.
Make this template your own!
Customize this workflow even further:
You're in good company
"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."
"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."
"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"
Ready to start adding free products to orders when customers use specific discount codes?
7-day free trial • 5 min setup • Cancel anytime
Need help? Our automation experts will help you personalize this workflow for free. Contact support