Can a product status automatically change to draft when stock equals zero?

Hi! I would like to know if its posible when the product is = 0, change his status from active to draft. Thanks sorry for my english!