I have a business partner that gives me a list of unique discount codes in a CSV file.
When a customer signs up in a ConvertKit form, I’d like to sent them the available next code from the list, and update the list with the email sent to.
Triggering from ConvertKit is straight forward.
More of a question, what is the best way to store the codes & how to select the next available code?
Best answer by PaulKortmanView original
I'm not yet sure how you would import the CSV's automatically, but I would put those into a Google Sheet. With a column for the code, and a column for the "status" I would put the statuses as "unassigned" for each code and then use that sheet in the following zap:
Step 1: Trigger: ConvertKit
Step 2: Google Sheets: Search for row: Have it search the second column (B) for the word unassigned
Step 3: Google Sheets: update row: use the row ID from step 2, and put anything in the second column other than unassigned.
Step 4: (outlook/gmail/convertkit etc) send the code to the user
In fact, now that I think about it you could use a zap to parse the original CSV and add a new row to that spreadsheet at the bottom automatically filling in the second column as “unassigned” however this would involve code and some magic, so we should put that in a different post. For now, if you just add the codes to the bottom of a google sheet and fill in the second column then the zap as described above will continue to work.