You would need a webhook to achieve this. You can store a list of all your promo codes in a table, and trigger a webhook when a form is filled. The webhook would pick the unused promo code from the table, change it;s status to used and print this in a custom MKTO field. After this field is updated, the promo code would go as a token in the auto-responder email.
Could you elaborate a little more on this? Our team is looking to setup some promo offers but we are new to Marketo and unfamiliar with the application of webhooks. Any additional detail you could provide on setting something like this up would help greatly.
You can think of a 'webhook' as a web service which performs certain action. To achieve your business functionality, to create a webhook, you will need a separate webserver and custom code implemented there which will pick the unused promo code from the table, change it;s status to used and print this in a custom MKTO field as Alok said here.
Thus your webhook might need SQL table, some php or similar programming and a web server to implement. And then you will need to do some additional smart campaign flow actions in Marketo to use that web hook.
You can refer to Webhooks » Marketo Developers for more information.
Please feel free to reach out if you need more information.