How big was it? A gum tree? Some Lasiocampidae, Oecophoridae, and Crambidae make nests like that, but of different sizes. But to find the species, you need to cut it open carefully with , say, nail scissors, and see if it contains a pupa (moth) or eggs (spider), then keep it in captivity to see what emerges.