There is a rather nice presentation of the category of small categories as a pullback in CAT (see the exposition in Mellies’s “Segal condition meet computation effects”, for example).
In the category of graphs, note that the subcategory of objects representing the “paths of length n” functor is dense (call this Path), so the category of graphs is a full subcategory of presheaves on Path. Also note there is a bijective on objects functor from Path to the simplex category, giving a monadic functor from simplicial sets to presheaves on Path. The pullback in Cat is precisely the full subcategory of simplicial sets satisfying the Segal condition (modacity of the forgetful functor down to graphs follows from Weber’s nerve theorem).
It certainly feels as though there should be a similar construction of the category of groupoids using cubical sets (with connection) in the literature, but I haven’t been able to track it down. The closest is the nLab’s page, where the Segal condition can likely be derived.