  The Molien-Weyl integral formula and the Hilbert-Poincar\'e series have
proven to be powerful mathematical tools in relation to gauge theories,
allowing to count the number of gauge invariant operators. In this paper, we
show that these methods can also be employed to construct Free Differential
Algebras and, therefore, reproduce the associated pure supergravity spectrum
and nonperturbative objects. Indeed, given a set of fields, the
Hilbert-Poincar\'e series allows to compute all possible invariants and
consequently derive the cohomology structure.
