Bag is a singular noun. Of books is telling is what's in the bag. It wouldn't be, "The bag of books are gonna be donated." Instead it would be, "The bag of books is gonna be donated." In the sentence, bag is the collective noun. You wouldn't say, "The group of dogs are coming," but instead it would be, " The group of dogs IS coming." However, if the collective noun was plural, it would be "are".