APIs & Integrations

paulrice
Member

Passing hashed email from HubSpot form to external website

SOLVE

We sell a SaaS application. The signup process is external from our HubSpot website.

 

I want to include an email address field and "get started" button on our HubSpot site.

 

When someone enters their email address and clicks "get started" I want to take them to the application site signup page (where name and a password are required.) I want to per-populate the email address field with the data entered on the Hubspot side.

 

Is there a resource to guide me in hashing that email from the HubSpot form and passing it over to the application?

0 Upvotes
1 Accepted solution
tjoyce
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Passing hashed email from HubSpot form to external website

SOLVE

@paulrice - You would use the global event callbacks for the forms javascript api

https://legacydocs.hubspot.com/global-form-events

 

 

 

window.addEventListener('message', event => {
   if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmit') {
       const email = $('input[name="email"]').val();
       window.location.href = "mysaasapp.com/login?email=" + email;
   }
});

 

 

View solution in original post

3 Replies 3
mtatari
Participant

Passing hashed email from HubSpot form to external website

SOLVE

I was about to ask the exact same question but then found this post. 

 

We are also in SaaS and new users fill a hubspot form to start new trial. They need to create an account on an external website. 

 

After they fill the form in hubspot, they get a followup welcome email in workflow with a link to create their account. 

 

I want to add the email they have submitted in the form to this link so their email is prefilled on the create account page in the external website. 

 

How can i do this using hubspot workflows ?

0 Upvotes
tjoyce
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Passing hashed email from HubSpot form to external website

SOLVE

@paulrice - You would use the global event callbacks for the forms javascript api

https://legacydocs.hubspot.com/global-form-events

 

 

 

window.addEventListener('message', event => {
   if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmit') {
       const email = $('input[name="email"]').val();
       window.location.href = "mysaasapp.com/login?email=" + email;
   }
});

 

 

dennisedson
HubSpot Product Team
HubSpot Product Team

Passing hashed email from HubSpot form to external website

SOLVE

Hey @paulrice 

Welcome to the Community! 

Wonder if @tjoyce  or @piersg  have some ideas on how to do this.