Cyanosilylation of carbonyl compounds provides protected cyanohydrins, which can easily be converted into various compounds such as amino alcohols, amides, esters, and carboxylic acids. We herein describe an electrochemically initiated cyanosilylation of carbonyl compounds using trimethylsilyl cyanide as the sole carbon source and its application to a microflow reactor. To optimize suitable reaction conditions, we demonstrate the machine learning-assisted exploration. Machine learning well supported us to adjust the current and flow rate at the same time and identify the conditions needed to achieve the best productivity.