Barcelona won 0-2 at Cornella last Thursday night and that booked their place in the last 16 of the Copa del Rey.
The draw was made at Spanish FA's HQ in Las Rozas near Madrid on Friday lunchtime. Ronald Koeman's side have been given a trip to southern Madrid to face Rayo Vallecano in the last 16 phase of the competition. The fixture will take place on Wednesday night at 21:00 CET.
Take a look at Barca's ball being drawn in the video above!