What is the mechanism of azulene synthesis?
The @orthocresol link to the Zincke reaction is a good start to the mechanism. You are correct about the first step. Dimethylamine adds to the electrophilic pyridinium salt 1 as illustrated in 1 --> 5.  The reaction is driven by loss of the poor nucleophile (decent leaving group), DNP-NH2. The (Z)-isomer 5 is in equilibrium with the (E)-isomer 6 but the reactions leading to azulene 12 require a cisoid conformation to allow for cyclization.
Cyclopentadienide anion, which is delocalized but for convenience is shown as a localized anion, displaces dimethylamine which is protonated by the methanol in the reaction mixture (see your link to Organic Synthesis). Fulvene 8 must generate the geometry shown to complete the remaining steps to azulene (9 --> 12). ADDENDUM: An added thought. The transformation of 8 ---> 10 may be a 4n+2 disrotatory thermal electrocyclization that forms the new sigma bond of 10 with cis hydrogens.