How to run an email promotion with cart attributes in Shopify Scripts?

Trying to run a promotion where if the email (inputted on a landing page and stored in cart.attributes) is not that of a previous customer, we add two items to the cart.

I’m running in circles now with Shopify Scripts. Is this doable and what’s the smart way of approaching this?