||We investigate invasions from a biological reservoir to an initially empty, heterogeneous habitat in the presence of advection. The habitat consists of a periodic alternation of favorable and unfavorable patches. In the latter the population dies at fixed rate. In the former it grows either with the logistic or with an Allee effect type dynamics, where the population has to overcome a threshold to grow. We study the conditions for successful invasions and the speed of the invasion process, which is numerically and analytically investigated in several limits. Generically advection enhances the downstream invasion speed but decreases the population size of the invading species, and can even inhibit the invasion process. Remarkably, however, the rate of population increase, which quantifies the invasion efficiency, is maximized by an optimal advection velocity. In models with Allee effect, differently from the logistic case, above a critical unfavorable patch size the population localizes in a favorable patch, being unable to invade the habitat. However, we show that advection, when intense enough, may activate the invasion process.