Distinguishing classes within substellar objects and understanding their formation and evolution need larger samples of substellar companions such as exoplanets, brown dwarfs, and low-mass stars. In this paper, we look for substellar companions using radial velocity surveys of FGK stars with the SOPHIE spectrograph at the Observatoire de Haute-Provence. We assign here the radial velocity variations of 27 stars to their orbital motion induced by low-mass companions. We also constrained their plane-of-the-sky motion using HIPPARCOS and Gaia Data Release 1 measurements, which constrain the true masses of some of these companions. We report the detection and characterization of six cool Jupiters, three brown dwarf candidates, and 16 low-mass stellar companions. We additionally update the orbital parameters of the low-mass star HD 8291 B, and we conclude that the radial velocity variations of HD 204277 are likely due to stellar activity despite resembling the signal of a giant planet. One of the new giant planets, BD+631405 b, adds to the population of highly eccentric cool Jupiters, and it is presently the most massive member. Two of the cool Jupiter systems also exhibit signatures of an additional outer companion. The orbital periods of the new companions span 30 days to 11.5 yr, their masses 0.72 MJ–0.61 M⊙, and their eccentricities 0.04–0.88. These discoveries probe the diversity of substellar objects and low-mass stars, which will help constrain the models of their formation and evolution.