Nov 10, 2021 04:09 PM
Dear community, someone asked a similar question but the topic has been archived with no replies.
My problem is that I have made a table with 10K records made of 4 letters coupons (promo codes) in the primary field. Another column is made of emails linked to another table with my users (Master table). I’d need for unused coupons/records to be picked and assigned to one user each time they join us with a certain status.
I am wondering if I would need an automation (from Zapier or Airtable) or a script to achieve this.
Thanks in advance!
Nov 15, 2021 12:24 PM
Hi @Sophie_Mona_Pages ,
It’s a bit of a hack, but I have a similar kind of workflow and this is how I deal with it.
Create a column in your coupon code base with a formula that just has the string “Coupon Code” inside it (yes include the quotes in the formula field). This should result in every cell in this column displaying the the text “Coupon Code”. Call this column “Zapier Search Column”
Create a view in your coupon code table that is filtered so that the link column connected to your users table “does not exist” or “is empty” (i don’t remember the verbiage right now). Name this view “Available Coupon Codes”
Create a zapier with the following steps:
Zap Step 1: Zapier looks for newly added user record (or new record in view)
Zap Step 2: Zapier searches “Available Coupon Code” View using the “Zapier Search Column” Column.
Your Search text should be “Coupon Code” (to match the formula you created in the airtable column).
NOTE: When you test this step you are only going to get a single result even though technically everything in the view matches your search – this is because zapier is not smart enough to return multiple results and basically displays the first match it finds. Because your entire view is filtered so that any of your used coupons will not show up, whatever coupon record the search does return won’t conflict with any previously assigned coupons.
Zap Step 3: Edit the record from the first step. Put the record ID found in the search step (for the coupon) as the input of the field which is linking your User Table to your Coupon Table.
This basically create
Wrote this up super quickly so, let me know if you have any questions!
Dec 01, 2021 07:59 AM
Thanks a lot Adrian! That’s super helpful :slightly_smiling_face:
Apr 20, 2022 12:06 PM
It seems to me that, yes, you need a script, but I’m not sure. Did you know that often a promo code for a discount is issued with the condition of fulfilling any conditions? I rarely want to fulfill them, so I’m looking for more good and easy-to-use coupons. Most often, I find them here https://www.dontpayfull.com. Marketplaces, working online, try to reach the widest possible audience of buyers. Therefore, they develop special discount programs that allow customers to shop with significant savings. Such offers become especially relevant before important events.