Adding Loggedin user info into Drift chat

In case one wants to add logged in user email into Drift chat:

    document.addEventListener("DOMContentLoaded", function() {    
        if(window.logged_in_user && window.drift) {
            const email = window.logged_in_user.softr_user_email;
            drift.on('ready', function() {
                    email: email

I want to do the same thing with HubSpot Chat. Seems we need to use the Hubspot Visitor Identification API ( Has anyone managed this using the built-in Softr integration ?

@erwanp seems hubspot’s version is relying on some backend api too which makes it harder