Working with the Gravity Forms Hubspot Add-on
Note: I know this post will only be for a select few of the people who read this blog. If this title means nothing to you, I won’t be offended if you move right along. I’m trying to share more useful knowledge these days so we’ll probably continue to have a mix of fun writing and stuff like this. The more I try and “focus” the content I make, the more I realize the mixed bag is a much better reflection of who I am. So as the kids say “it is what it is”. (I understand no kid has ever said that).
Last month Gravity Forms released an official Hubspot add-on which was a welcomed addition.
It’s no secret that I’m a big Gravity Forms fan, so any time I see a new integration with third-parties I throw a tiny party for one at my desk because I know it’s something I’ll be able to rely on and recommend to clients.
Clients have been looking for this add-on because lots of their existing Gravity Forms would trigger other actions or notifications, or they were really happy with the current forms workflow, or loved the styling of their forms and didn’t want to have them recreated, but they also needed their data passed into Hubspot.
There were hacks and ways around it with Gravity Forms previously, and a few solutions from sources I wasn’t crazy about. The officialness of this new add-on is exactly what I’ve been looking for.
We had a client who was ready to use the new add-on right away so I got right to it.
Getting Started with Gravity Forms and Hubspot
The setup flow is about what you’d expect, after installing the add-on (which is available on their Basic add-on list, which is wild to me) and activating it, you can navigate to the Hubspot settings screen and connect to your Hubspot account. If you’re doing this on behalf of a client, you’ll need to have access to Hubspot, or the client will need to perform the authorization piece.
After granting access to Hubspot, you go about setting up a feed just like any other third party integration.
- Set a Name for the Feed – This is for internal use only, so whatever will help you or your client best remember what this feed is doing is good enough.
- Set the Hubspot Form Name ID – This name does have to be unique for your Hubspot account. In other words, you can’t have two Gravity Forms feeds with the same Hubspot Form Name ID. When you create the feed, it creates a corresponding Hubspot Form for you automatically. Having multiple forms with the same name will cross streams, which can have unexpected results.
- Assign the Lead Status – You can choose any lead status that you have configured in your Hubspot account, including custom statuses.
- Assign the Lifecycle Stage – Assign where leads from this form should end up in your Lifecycle. If this is a sign up form for a service you offer, you could set the contact status to “Customer”. Otherwise, choose the appropriate place in your marketing pipeline for the lead.
- Assign the Contact Owner – Hubspot allows Contacts to be assigned to individuals within your organization. You can assign all the leads from a form to an individual, or conditionally assign them depending on options selected by the person completing the form.
- Map the form fields to Hubspot Contact details – By default you can assign Name, First Name, and Last Name to the new Hubspot contact that gets created.
- Assign additional contact details – You can also map any other form field to other contact details in your CRM (screenshot below).
Testing Your Newly Created Gravity Forms (ie. What I Learned)
In testing we kept having a really strange issue where our submissions would be sporadically rejected by the Hubspot API. We couldn’t figure out what was happening or why. Configurations weren’t changing at all, but one submission would go through fine, and then the next submission, two out of four contact creations would fail.
I reached out to Hubspot and they had an answer that made perfect sense for why the Hubspot API was rejecting the new contacts.
This is because an attempt was done to send a Marketing Email from HubSpot to that address, and the domain of this address was not found, therefore it was suppressed. When this happens, we “blacklist” this email address domain, and the behavior described above will occur. The result you are seeing in your API is the “translation” of this behavior.
In less formal terms, because we were using dummy data in our test submissions, Hubspot could detect that and refused to create a contact with a fake email.
This is one of those rare cases where I actually believe it’s a feature and not a bug, even though it really felt like a bug at first.