Joining an event to ride with a friend

I know you can select a friend from the top of the riders list for an informal ride. But how do you join up with a friend at the start gate of an event such as a gran fondo for example? Thanks.