The Fifth Generation of Mobile Communications (5G) will lead to the growth of use cases demanding higher capacity and a enhanced data rate, a lower latency, and a more flexible and scalable network able to offer better user Quality of Experience (QoE). The Internet of Things (IoT) is one of these use cases. It has been spreading in the recent past few years, and it covers a wider range of possible application scenarios, such as smart city, smart factory, and smart agriculture, among many others. However, the limitations of the terrestrial network hinder the deployment of IoT devices and services. Besides, the existence of a plethora of different solutions (short vs. long range, commercialized vs. standardized, etc.), each of them based on different communication protocols and, in some cases, on different access infrastructures, makes the integration among them and with the upcoming 5G infrastructure more difficult. This paper discusses the huge set of IoT solutions available or still under standardization that will need to be integrated in the 5G framework. UAVs and satellites will be proposed as possible solutions to ease this integration, overcoming the limitations of the terrestrial infrastructure, such as the limited covered areas and the densification of the number of IoT devices per square kilometer.