So only O is added to the molecule instead of CO2. The O is provided by an oxidizing agent. (Oxidizing agents can be potassium permanganate, hydrogen peroxide, airborne oxygen, etc.).
Cinnamic acid can also be synthesized by the Perkin reaction: benzaldehyde + acetic anhydride + K2CO3=== C6H5-CH=CH-COOH + CH3COOH
If you go this route, the bubbles are produced by the decomposition of the K2CO3 into CO2 in the presence of acid:
K2CO3 + RCOOH = RCOOK + CO2 + KOH
. CO2 + KOH