Finaly I could make it work. The Cube has an I2C 2, and the px4flow use I2C 1. the GPS connector has the I2C 1, so I have modified a GPS cable and did the trick.
So If any one else try to use a px4flow on a Cube, you have to use the I2C connection from the GPS on the cube,set flow_type to 1 and done!
And dont use the sonar on the px4flow, seems to be not so reliable.