How can I offer timed discounts for email sign-ups?

Hi all,

I want to drive traffic to sign up to my email marketing list. When they submit their email I want to provide them with a unique, 24-hour discount code for ‘X’ amount.

Would anyone know how to do this or which app could facilitate it?

Thanks!