wp_get_current_user return ID = 0 when used outside of wordpress, such as webhook / fulfillment dialogflow

I dont understand where are you calling from. I can give you an alternative solution that may or may not work in your case (since I don’t fully understand your case):

This is your ajax-url on your site:

echo admin_url( 'admin-ajax.php' );

Usually we attach it to the JS to run AJAX calls:

wp_localize_script( 'THE_JS_THAT WAS_ENQUEUED', 'PARAMS', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );

Even without wp_localize_script you can always print the admin_url( ‘admin-ajax.php’ ) to screen, and input it in any other process.

Now that you have the AJAX link, you can use AJAX to get the current connected user, and return it, as long as you call it from the same browser (meaning same cookie).