if you doing dynamic coupon codes from a database, add a freeShipping column, set it to 1 for coupons that should give free shipping and 0 for coupons that don't.
set a freeShipping session variable to use the value from the recordset.
in the shipping rules, set a trigger to make sure the freeShipping session is not equal to 1.