Complex sentence: Such canal was built by king Chulalongkorn, it was completed in 1868, and attracted a lot of Chinese immigrants stay in the area, they built this Taoist temple in 1878.
Split into simpler sentences: Such canal was built by king Chulalongkorn, it was completed in 1868. This meant it attracted a lot of Chinese immigrants stay in the area, they built this Taoist temple in 1878.