Send out Email with variable code for entrance ticket?

New Contributor

Hi there!


I have got a csv-file containing entrances codes for a trade show (simple hexadecimal codes). After a user submitted a form on a landing page we want to send out an automated Email with the entrance code - for the user to get a ticket on the show's web page. Every code can only used once.


How can I implement the selection of the codes out of my csv-file?

I thought about adding the code as a contact property by useing a hidden field in my form or by running the contact trough a workflow. But I could not find a way to ad a variable value there. As an alternative I tried to add a placeholder into my email which accesses the csv-file. However, so far I was not able to realize any of these ideas. :-(


Thanks for any thoughts!


3 Replies
Community Thought Leader


Help other HubSpot searchers find this post quickly by accepting this solution today.


Q: Send out Email with variable code for entrance ticket??


Short A: n/a


Longer A:

Can only think of these options ... maybe other guys have better ideas ... @Phil_Vallender@tjoyce@bradmin@mrcruz


-1- Modify an existing HubSpot coupon code integration to meet your need. (none known)

- see Importing unique coupon codes for integration in workflow


-2- Have a solution custom developed for you. (check out HubSpot's Designers and Developers forums)


-3- Use a custom contact property and upload a unique code for each contact in your entire CRM. (not elegant, and only works for KNOWN contacts)

- see How to send unique coupon codes to known customers without any integrations 


Always happy to help. Reach out anytime if we can be of assistance with HubSpot.





Top Advisor

Hi, @Julia_Ocken. I get the use case, and I'm not certain how to accomplish this in a real-time way. (In a perfect world, you'd have unlimited dev resources which could either generate or call these codes and produce them on form submission, he wrote, because deploying real-world code is just as simple as this abstraction, obviously.)


That other post @MFrankJohnson referred to is a useful primer if you need help generating the codes, although it sounds like you already have those handy. Assuming you have the codes already, here's how I'd solve for it, although it's not terribly scalable nor real-time:

Create a HubSpot workflow of anyone who's completed that form, and whose [custom code property] has a value. The workflow sends the desired email. Periodically (say, on a daily basis), import the known codes you have on the contacts who have completed that form, which will enroll them into the workflow. 


This is kind of a limited approach, as it assumes you'll never use the coupon code property again; or, if you do, that you'll have to clear that out. It's also triggered by manually importing the codes, which isn't an immediate or scalable solution. This isn't great, but it's the most "automated" way I can think of using point-and-click tools. 


I'll think over whether you could rig together Zapier to automatically populate the coupon code property, but I'm not sure if this is feasible. 

Brad Mampe, BevSpot
I'm probably wrong. I may not be right about that.
New Contributor



thanks for the quick responses! Smiley Happy The semi-automated approch from @bradmin would have been my favourite option but it was decided to drop the use of HubSpot in this  specific case. However, a scenario like this is most likely in the future - that's why we will continue working on a solution with reasonable workload for the person who is supervising the campaign.