The Scenario
You're running a partner activation campaign — 50 partners, each getting a unique 20%-off promo code to share with their audience. The code names are already in Column A of a sheet (partner name + a suffix). You need every one of those codes created in Lemon Squeezy and the returned discount IDs written back to Column B so your partner ops tool can distribute them.
Manual creation in the Lemon Squeezy dashboard means: open the Discounts page, click Create Discount, fill in the code name, set the percentage, save. Fifty times.
The bad version:
- Start clicking Create Discount in the Lemon Squeezy dashboard
- Enter code name for partner 1, set 20% off, save
- Repeat 49 more times, keeping the browser tab open and the sheet tab open side by side
- Make a typo on code 31, delete it, recreate it
- Realize you forgot to set the same expiry date on the first 15 codes you created
Fifty codes. Fifty form submissions. One afternoon gone.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads the code names from Column A and connects to Lemon Squeezy through its built-in integration to create all 50 discount codes in one pass.
Create a Lemon Squeezy discount for each row in Column A using that value as the coupon code with 20% off for store ID in cell B1 — write the returned discount ID into Column B
What You Get
- Column B: the Lemon Squeezy discount ID for each newly created code
- All 50 codes created with the same discount percentage and settings in a single pass
- Error messages written to Column B for any row that failed, so you can identify and fix them
What If the Data Is Not Quite Ready
You want codes to expire in 30 days
Generate 50 Lemon Squeezy discount codes using the code names in Column A, all set to 15% off and expiring in 30 days — write each discount ID back into Column B
You have different discount percentages per partner
Create a Lemon Squeezy discount for each row in this sheet using the code name in Column A and the percentage in Column B — write the returned discount ID into Column C and any errors into Column D
You want to skip rows where Column B already has a value
For each row where Column B is blank, create a Lemon Squeezy discount using the code name in Column A with 20% off — write the returned ID into Column B
Full campaign setup in one shot with summary
Create a Lemon Squeezy discount code for each row in Column A using the code name as-is, set to 20% off with an expiry of June 30, 2026 — write the returned discount ID into Column B, any errors into Column C, and after all rows are done write a count of successes into cell E1
One prompt. Fifty codes. Campaign ready before the partner kick-off call.
Try It
Get the 7-day free trial of SheetXAI and open the Google Sheet with your partner code list, then ask it to create all the Lemon Squeezy discounts and write the IDs back. You can also pull discount redemption data later to track which partner codes drove the most revenue.
