This article presents an approach to autonomous flight planning of Unmanned Aerial Vehicles (UAVs)-Drones as data collectors to the Internet of Things (IoT). We have proposed a model for only one aircraft, as well as for multiple ones. A clustering technique that extends the scope of the number of IoT devices (e.g., sensors) visited by UAVs is also addressed. The flight plan generated from the model focuses on preventing breakdowns due to a lack of battery charge to maximize the number of nodes visited. In addition to the drone autonomous flight planning, a data storage limitation aspect is also considered. We have presented the energy consumption of drones based on the aerodynamic characteristics of the type of aircraft. Simulations show the algorithm’s behavior in generating routes, and the model is evaluated using a reliability metric.