HubSpot Ideas

Yoshi

Auto populate city state based on postal code

Currently, HubSpot form does not support auto populate city or state based on postal code or zip. 

 

It would be great if we could have that feature for HubSpot form. 

42 Kommentare
Status aktualisiert zu: Not Currently Planned
JoeMayall
HubSpot-Alumnus/Alumna

Hey folks,

 

I've been in contact with our Product team about this Idea, and I wanted to relay the state of our development plans. At this time, autopopulating the city and state based on the postal code is not in our immediate development roadmap. Our team is aware of this Idea, and certainly understands the use case for it, but it isn't something we have scoped out for the immediate future.

 

This isn't to say we'll never build it, or that we have a reason against it, just that the team is focused on other features and tools at this time. All future developments will be relayed through this thread, so please stay tuned and continue to leave feedback.

 

Best,

Joe

aparnarevi
Teilnehmer/-in

upvoting this idea as well

SBenfield
Teilnehmer/-in

Such an important need for the customer experience when filling out forms on our website as well as the database maintanace across two systems, it's disappointing to see no solution in the 3 years we've been with HubSpot. Pleasw help us with a solution.

mmartelli0803
Teilnehmer/-in

Not being able to use lookup or relational tables is prohibiting us from migrating from Salesforce CRM to Hubspot CRM. There has to be a solution. Am I missing something?

FrankMurray
Mitglied

I upvoted this idea over a year ago and this request has been here for a lot longer than that. This isn't some fancy idea - this allows us to ask less of the customer to convert more.  

JDRECQ
Mitglied

It will be a great idea if it could be available in France ! 

DKiwior
Mitglied

Hi, new Hubspot users here.  Getting ready to roll it out to the company and was hoping to get an update...if there is one...on this feature/improvement....  Auto populate city state based on postal code.   Any update since Joe's post on November 10, 2020 ??

 

Sure would be helpful...and there is a great deal of need/interest.

 

Thanks,


Dave

IAkin
Mitglied

Upvote!!

Marc_K
Mitglied

Yes please! I am baffled that this is not a feature.

 

+1

SMcClintock
Mitglied

This would be a great addition to help limit the number of required fields on a contact form.

HarvestROI
Mitwirkender/Mitwirkende | Platinum Partner

Is there a third-party app that anyone knows of that would do this?

RGeelen
Mitglied

I fixed this issue by creating a workflow with a custom code block.

I used the google geocode api to find the city based on the postalcode of an contact person

 

1. Create a trigger for postalcode and select the option "is known". 

Note: Don't forget to select the postalcode is known in the re-register tab.

 

2. Add the block custom code to your workflow.

 

3. Add your google apikey to the secret field

 

4. Add postalcode to the properties to be included in the code.

at the end it should look like this: 

RGeelen_0-1649758827301.png

 

5. Write the custom code:

This is the code i written to get the city by the postalcode:

const hubspot = require('@hubspot/api-client');
const axios = require('axios');

exports.main = async (event, callback) => {
  const zip = event.inputFields['zip'];
  var city = "";
  var url = [
    "https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:",
    event.inputFields['zip'],
    "|country:NL&key=",
    process.env.GAPIKEY
  ];
  
  // Get city by postalcode using google api
  await axios
  .get(url.join(""))
  .then(res => {
    console.log(`statusCode: ${res.status}`)
    res.data['results'][0]['address_components'].forEach(function (item, index){
      if(item['types'][0] == "locality") {
         city = item['long_name'];
      }
    })
  })
  .catch(error => {
    console.error(error)
  })
  
  callback({
    outputFields: {
      city: city
    }
  });
}

Note: make sure you change the country in the url to your country

 

6. Define city the output fields so it can be used in the workflow

RGeelen_1-1649759397098.png

 

7. Add a new action to the workflow "copy property value", chose the output from the custom code and the value of the contact person in this case city.

RGeelen_2-1649761491023.png

 

Save the workflow and you are done

 

ENewcomb2
Teilnehmer/-in

I see multiple requests for this feature almost every week. I know it's not currently planned, but making it possible to just put in a zip code when creating a contact would be very useful for all prtal users.

LSmith502
Mitglied

agreed! similar to how the copy information is automatically update by domain, postal code should automatically update contact fields.  One less of a field for customers to have fill in. 

Basile_Richard
Mitglied

yes, same need here for this feature

LSmith502
Mitglied

Has anyone used  https://zipcodeinfo.org as a solution yet?  

GTucker
Teilnehmer/-in

@LSmith502 That app is no longer found in the Marketplace. Their website won't let me open a ticket to inquire why either. Does anyone know if this plug in still works or are there any new alternatives?

HVogt
Teilnehmer/-in | Gold Partner

@JoeMayall Is there an update on this from the development team? It's been years and the community is still asking for it. Heck, @RGeelen may have even provided the solution code to HubSpot to implement for all, per his post back on April 12, 2022.

RBozeman
Teilnehmer/-in

Yes, I know this is a much-requested feature. Lots of companies collect the postal code but not other information on forms. 

 

Also wanted to mention that Insycle can help with populating states based on postal codes in HubSpot. Full disclosure, I work for Insycle as a product marketer.  You can do this using the "Map US Postal Code to US State" function in Insycle. Then you tell Insycle what field to look for the postal code in, and the correct "State" field to populate. 

hubspot forums.png

Then, you could schedule this template to run on a consistent basis (daily, weekly, monthly), or even inject it into HubSpot Workflows so that the state field is populated immediately after your form data is collected. 

 

Hope that helps!

 

Best,
Ryan

GTucker
Teilnehmer/-in
Thanks. I've used Insycle with a client and it mostly worked for them. Some
CRMs are in such bad shape they don't always work though.