From there the waters flow through the Oulujoki river into the Gulf of Bothnia.
The reference sentence describes a water route from one body of water to another, with the Oulujoki river serving as the conduit for the flow into the Gulf of Bothnia.