Four-dimensional (4D) printing has attracted significant attention, because it enables structures to be reconfigured based on an external stimulus, realizing complex architectures that are useful for different applications. Nevertheless, most previously reported 4D-printed components have focused on actuators, which are just one part of a full soft robotic system. In this study, toward achieving fully 4D-printed systems, the design and direct ink writing of sensors with a straining mechanism that mimics the 4D effect are explored. Solution-processable carbon nanotubes (CNTs) were used as the sensing medium, and the effect of a heat-shrinkable shape-memory polymer-based substrate (i.e., potential 4D effect) on the electronic and structural properties of CNTs was assessed, followed by their application in various sensing devices. Herein, we reveal that substrate shrinking affords a more porous yet more conductive film owing to the compressive strain experienced by CNTs, leading to an increase in the carrier concentration. Furthermore, it improves the sensitivity of the devices without the need for chemical functionalization. Interestingly, the results show that, by engineering the potential 4D effect, the selectivity of the sensor can be tuned. Finally, the sensors were integrated into a fully 4D-printed flower structure, exhibiting their potential for different soft robotic applications.