Gravit Forms Notification send after 3rd party API response

I think gform_after_submission is the wrong action to use in this case. Have you looked at gform_pre_send_email? It has an abort_email parameter, which might be useful.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)