We discuss generalizations of the Temperley-Lieb algebra in the Potts and X X Z models. These can be used to describe the addition of integrable boundary terms of different types. We use the Temperley-Lieb algebra and its one-boundary, two-boundary, and periodic extensions to classify different integrable boundary terms in the two-, three-, and four-state Potts models. The representations always lie at critical points where the algebras becomes non-semisimple and possess indecomposable representations. In the one-boundary case we show how to use representation theory to extract the Potts spectrum from an X X Z model with particular boundary terms and hence obtain the finite size scaling of the Potts models. In the two-boundary case we find that the Potts spectrum can be obtained by combining several X X Z models with different boundary terms. As in the Temperley-Lieb case, there is a direct correspondence between representations of the lattice algebra and those in the continuum conformal field theory.