How do I add a unique discount codes to an automated email

Hi all, I’m trying to set up an automated email that will include a discount code for our Amazon products.

So the idea is, the customer fills out a Wix form and get’s sent a confirmation email with a code that they can input into Amazon for 15% off

I know you can set up automated emails, I’m just not sure how to get a code from our spreadsheet list and add it into the email automatically.

Any advice is much appreciated! I’ve got some freelancers on standby to do it for me, just in case it’s too much for me to wrap my head around :rofl:

It’s usually not a good idea to use a spreadsheet as a db. You will have to retrieve a discount code, mark it as used, etc. It would be better to put the spreadsheet content inside a Wix Collection and query/update it .

@giri-zano - sorry could you explain what you mean by query/updating the Wix Collection? How does that work? Also having the same issue as @markmartin1337