In this letter, we consider a transportation network with a 100% penetration rate of connected and automated vehicles (CAVs), and present an optimal routing approach which takes into account the efficiency achieved in the network by coordinating the CAVs at specific traffic scenarios, e.g., intersections, merging roadways, roundabouts, etc. To derive the optimal route of a travel request, we use the information of the CAVs that have already received a routing solution. This enables each CAV to consider the traffic conditions on the roads. Given the trajectories of CAVs resulting by the routing solutions, the solution of any new travel request determines the optimal travel time at each traffic scenario while satisfying all state, control, and safety constraints. We validate the performance of our framework through numerical simulations. To the best of our knowledge, this is the first attempt to consider the coordination of CAVs in a routing problem.