- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hubspot forms and Google SSO
SOLVEOct 22, 2020 10:04 AM
Hello community!
I am trying to work with my dev team and convert all the web forms and app sign in forms we have into Hubspot forms. For this, I am using Hubspot's Forms API and the web form embed code.
One such form on our website allows users to sign up using their Google email. Is there a way for me to capture that email as well and store it on Hubspot?
Any pointers or help documentation here will be appreciated.
- Drishtii
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Accepted Solutions
Oct 23, 2020 5:42 AM - edited Oct 23, 2020 5:47 AM
> One such form on our website allows users to sign up using their Google email. Is there a way for me to capture that email as well and store it on Hubspot?
as far as google oauth2 goes, a successful signin will return profile information back to your callback endpoint. Not 100% sure but I think you set up the scopes within google console so that you'd get their email, name etc. You would want to capture that on the app endpoint, and probably do some sort of database check:
user = askMyDatabase(data.email)
if (user === undefined) { submitDataToForm(data) }
then you could try to use the submit form endpoint: https://legacydocs.hubspot.com/docs/methods/forms/submit_form
so effectively you would create a form in HubSpot, but you would never really embed did if that makes sense.
let me know if i understood you wrong
no idea how your setup is but I hope the general idea comes across 🙂
scopes:
https://developers.google.com/identity/protocols/oauth2/scopes
endpoint for checking contact existence:
https://legacydocs.hubspot.com/docs/methods/contacts/get_contact_by_email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content