Recent studies have highlighted the importance of the genetic makeup of the plant and its associated microbes in the assembly of the microbiome, yet an in-depth investigation of the influence of the chemical environment on these processes is still lacking. Using experimental systems in which we can control the host, the microbes, and the chemical environment, we find that chemical stimuli strongly influence plant-bacterium as well as bacterium-bacterium interactions and that their outcome is difficult to predict. Using meta-transcriptomic analysis plant-bacterium interactions in different chemical environments, we show how specific chemicals alter binary bacteria-bacteria interactions. These changes feed forward into interactions with a host plant and alter the host’s response to microbial colonization. The presence of a particular environmental chemical, the benzoxazinoid APO, markedly influences the plant response to single bacterium, in particular through interference with specialized metabolism. In ternary plant-bacterium-bacterium interactions, presence of APO in the environment had a weaker effect, and the plant mounted a consistent response to bacterial colonization. Our work expands the study of synthetic microbial communities by integrating synthetic environments, to understand the processes that shape community assembly.