Skip to main content

Hi, We are new to zapier and trying to find a solution to a problem we have. We have generated a large amount of discount codes that we would like to send to cusotmers who make a specific item purchase on our website. The idea we have is that if the customer belongs to a hubspot list, they will eventually get a discount code which is unique sent to them.

I am trying to use google sheets to store the individual unique codes, where one must be applied to one customer. how can i use zapier, to assigned a unique code and the get zapier to pick it back up and store it in hubspot, so we can set an automation to send the code to the customer?


Would appreciate any help anyone can give, i know its possible but i am unable to work it out, many thanks


Chris


Hi @chrisb

So, in Google Sheets you'll want a two-column sheet - "Status" and "Code".

All your codes go in the "Code" column and the "Status" column should be set to 'Unused' for each row.

Your zap would trigger on a new person added to the Hubspot list and it would then search Google Sheets, looking for the row where "Status" = 'Unused'.

That way it will grab the first code.

Then there should be "Google Sheets->Update Row" step that changes the "Status" of that row to 'Used'. That way, next time the sheet is searched, the next row down is grabbed.

Finally, you can update the Hubspot contact saving their code in one of the contact fields.



this is great thank you, i have now managed to set it up!


Thanks for all the help


Chris