You can add listener on submit ..something like this:
document.addEventListener( 'wpcf7submit', function( event )
{ if ( '123' == event.detail.contactFormId )
{ alert( "The contact form ID is 123." ); // do something productive } },
false );