How it works

Follow these 4 simple steps to start adding free products when customers purchase specific items

Shopify logo icon

Order Created

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step monitors your Shopify store for new orders and instantly starts the workflow when a customer completes their purchase.

This trigger activates automatically whenever a new order is created in your Shopify store. It captures all the order details including line items, customer information, and product names. No configuration is needed - MESA connects to your Shopify store and begins monitoring immediately. The order data gets passed to the next step to check if the customer bought the qualifying product.

Loop: Number of matches

App connector: Loop • Time to complete: 1 minute
Why this matters: This step searches through all the items in the order to count how many match your target product, ensuring the free item is only added when the qualifying product is actually purchased.

This loop examines each line item in the customer's order and compares the product name against the qualifying product you specify. You'll need to enter the exact product name as it appears in your Shopify store in the "Which product must the customer purchase to be eligible for the free item?" field. For example, if you want to give a free sample when someone buys "Premium Face Cream", enter exactly "Premium Face Cream". The step counts all matching products and passes this number to the filter step.

Filter

App connector: Filter • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step acts as a gate that only allows the workflow to continue if the customer actually bought the qualifying product, preventing free items from being added to orders that don't meet the criteria.

The filter checks if the count from the previous step is greater than or equal to 1, meaning at least one qualifying product was found in the order. If the customer didn't buy the target product, the workflow stops here and no free item is added. If they did buy it, the workflow continues to the final step. This comparison is automatically configured to look for 1 or more matches.

Shopify logo icon

Add Line Item to Order

App connector: Shopify • Time to complete: 2 minutes
Why this matters: This step actually adds the free product to the customer's order with a 100% discount, completing the promotional offer automatically.

This action adds your chosen free product to the customer's existing order as a new line item. You'll configure two key fields: "What is the free product you would like to add?" where you select the actual product from your store, and "What is the variant of the free product you would like to add?" where you choose the specific variant (or "Default Title" if there are no variants). The step automatically applies a 100% discount so the item appears as free, sets the quantity to 1, and adds it without sending additional notifications to the customer.

Make it your own

Customize this workflow even further:

Set minimum purchase quantities
Modify the filter to require customers buy 2 or more of the qualifying product before receiving the free item, perfect for bulk purchase incentives.
Add multiple free products
Chain several "Add Line Item" actions together to give customers a bundle of free samples or complementary products when they hit your purchase threshold.
Store promotion tracking in tables
Save details about each free product redemption to your own database for analyzing which promotions drive the most sales and customer engagement.
Deploy AI agents for smart promotions
Let AI agents evaluate order history and customer segments to automatically choose different free products based on purchase patterns and customer preferences.

Frequently asked questions

Will this add a free product to orders that already contain the qualifying item from before I set up this workflow?
No, this workflow only affects new orders created after you activate it. Existing orders won't be modified, even if they contain the qualifying product.
What happens if a customer buys multiple quantities of the qualifying product?
The workflow adds exactly one free item regardless of how many qualifying products the customer purchases. If you want to give multiple free items based on quantity, you'll need to modify the "Add Line Item" step to use a variable quantity.
Can I set this up to work with product variants instead of just product names?
Yes, you can modify the filter in step 2 to check for specific variant SKUs or variant titles instead of the broad product name, giving you more precise control over which purchases trigger the free product.
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to start adding free products when customers purchase specific items?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Start with this template — It's free
7-day free trial • 5 min setup • Cancel anytime