Across the Metazoa, the emergence of new ecological interactions has been enabled by the repeated evolution of exocrine glands. Specialized glands have arisen recurrently and with great frequency, even in single genera or species, transforming how animals interact with their environment through trophic resource exploitation, pheromonal communication, chemical defense and parental care. The widespread convergent evolution of animal glands implies that exocrine secretory cells are a hotspot of metazoan cell type innovation. Each evolutionary origin of a novel gland involves a process of 'gland cell type assembly': the stitching together of unique biosynthesis pathways; coordinated changes in secretory systems to enable efficient chemical release; and transcriptional deployment of these machineries into cells constituting the gland. This molecular evolutionary process influences what types of compound a given species is capable of secreting, and, consequently, the kinds of ecological interactions that species can display. Here, we discuss what is known about the evolutionary assembly of gland cell types and propose a framework for how it may happen. We posit the existence of 'terminal selector' transcription factors that program gland function via regulatory recruitment of biosynthetic enzymes and secretory proteins. We suggest ancestral enzymes are initially co-opted into the novel gland, fostering pleiotropic conflict that drives enzyme duplication. This process has yielded the observed pattern of modular, gland-specific biosynthesis pathways optimized for manufacturing specific secretions. We anticipate that single-cell technologies and gene editing methods applicable in diverse species will transform the study of animal chemical interactions, revealing how gland cell types are assembled and functionally configured at a molecular level.