Artificial cells that encapsulate DNA-programmable protein expression machinery are emerging as an attractive platform for studying fundamental cellular properties and applications in synthetic biology. However, interfacing these artificial cells with the complex and dynamic chemical environment remains a major and urgent challenge. We demonstrate that the repertoire of molecules that artificial cells respond to can be expanded by synthetic RNA-based gene switches, or riboswitches. We isolated an RNA aptamer that binds histamine with high affinity and specificity and used it to design robust riboswitches that activate protein expression in the presence of histamine. Finally, the riboswitches were incorporated in artificial cells to achieve controlled release of an encapsulated small molecule and to implement a self-destructive kill-switch. Synthetic riboswitches should serve as modular and versatile interfaces to link artificial cell phenotypes with the complex chemical environment.