Can you guys can guide us in the right direction to what

Can you guys can guide us in the right direction to what function that we can use to confirm the appointment. We are confirming the appointment via an email link.

We are adding the appointment to our database and we will use this action.
do_action( 'app_new_appointment', $insert_id ); maybe you have a quick snippet that would get us the ID of the appointment when the appointment is submitted.

Thank you again.