It secretes the bile juice which plays an important role in the digestion of food.
It also performs the process of detoxification by converting toxic molecules into non-toxic forms like conversion of ammonia into urea which then gets excreted through urine.