The diagnosis and the treatment of gastrointestinal pathologies have experienced significant development in recent years with the invention of endoscopic capsules which facilitate the access to different sections of the gastrointestinal tract. At a research level, the concept of capsules has been used to perform several functions such as gastrointestinal tract inspection and drug delivery. Despite that, microbiota sampling still requires surgery in order to collect intestinal liquid samples. In this paper, we propose a microbiota sampling device that navigates through the gastrointestinal tract, takes a sample of the intestinal liquid and protects it from any contamination as the device navigates out of the human body. We use a bistable structure to close the capsule after sampling actuated by a foam. The device is safe for the human body and eco friendly, as it does not contain electronic components, batteries and does not require any external intervention. To manufacture the microbiota sampling capsule, we use additive manufacturing. This technology allows fast prototyping cycle at a relatively low cost. It also offers the use of biocompatible material in advanced stages of development.