The condensation of N-(3-acetylphenyl)acetamide (I) with dimethylformamide dimethylacetal (II) at reflux temperature gives N-[3-[3-(dimethylamino)-2-propenoyl]phenyl]acetamide (III), which is alkylated with NaH and ethyl iodide to the corresponding N-ethyl derivative (IV). Finally, this compound is cyclized with 3-aminopyrazole-4-carbonitrile (V) in refluxing acetic acid.