video: Using the Google Places API to enrich your company data in HubSpot
5821534132
Created By:
5
Upvote
Created By:
Show Full Video Translation
Hi everyone. In this video I'm going to show you a solution that can improve the data of your hotspot crm. If you ever had the issue that you had multiple companies without a company domain name, then this video might contain the solution that you need. What I'll show you is how you can use the Google Places API to search for additional information about a company using the company name and any information that we have available about the address. Now let's take a quick look at how that would work. Um, what we see right here is my hotspot CRM with a lot of data. Um, we have multiple companies with a bit of address information available. We have a company called Hotspot, not sure what that is. And we have a city value available and a postal code value available. And next we have a company called Bright Digital where we have a city value available, also street address and a postal code.
Now what I did is I created a workflow using custom code actions. However, if you do have the time, you could also create a public app and create custom workflow actions to create the same functionality. In this workflow, we will use the trigger company name is known and company domain name is unknown. So we know that any of the companies that will be enrolled will not contain a domain name but will have a company name. You might want to enhance this trigger by making sure that we also have a bit of address data available, but in this case for the video, I'm going to use this specific trigger. Now the first thing we have is a custom code action, and once again, this could also be a custom workflow action, um, which contains a secret. And this secret is the API key that we need to make API cost to the Google Places is api.
Now what we have as well is a bench of properties that we will use in our API call. We have a company name, we have a city, we have a zip, and we have address available in this case. And in our code, we are using aios to make an API call. We are including the values of these profit properties that we set above and we will build a query based on the values that we have available. So we know that our company name is available, but I added a little statement to make sure that we only include the city if it, uh, if it has a value. And I'll show you the result of this query in a second. The next thing we do is we will use Axios to make an API call to the Google Places API using the tech search endpoint and we will include our query and the API key
From the Secret Store. In this specific coded action, we are using a get request and we might get a response. The structure of the response of the Google Places API is that we will get a response with a data object and an array of results because we might get multiple results depending on the query that we used. We have a little if statement to make sure that we do have results available. And if we do have results available, we're going to pick the first result. You could improve this functionality to by adding additional filters to make sure that you are, uh, picking the correct company. But in this case, we will go ahead with the first result available. We have a little look so I can view the results better in the, uh, test of our workflows. And then we will return the place ID of this specific results back to our variable called company id.
And if you scroll down, you will see that I'm using the company ID as a output for this specific coded action. So if I were to test this specific, um, workflow and run the code, you'll see that I am using this specific query. So this is passed to the Google Places API as a query. We have name City Postal Code and address. And then you'll see that I get a result, which will contain a place id and the place ID is used in the output of this workflow. Now if I test the same with our other company called HubSpot, then you'll see that we get an additional result with a different place id. Now with this workflow, we do not have the domain available yet. That's why we have a second coded action to retrieve additional information based on the Google Places ID that we retrieved from the first coded action.
So let's take a look at this code. In this custom code action, I'm using the Google API key. Again, I'm including the output of the previous coded action and I'm also u using the company name to make my console logs a little bit more readable. Um, I'm making sure that we have a company ID with a value and if we do have a company ID available, I'm going to make a new API call to the Google Places api. But in this case, I'm using the details endpoint and I'm passing it. The ID are retrieved from the first workflow. Now I might need that value. So let me go back to the first coded action
And make sure that we have a value available. And if you test a coded action, HubSpot added a real marsh functionality that you can set the value you want to use for a outputted feal. So in this case, I'm going to use prior digital again and I'm going to pass it to Google Company id. And if I run this coded action, we will make the API key. And if we're lucky, we will get a website from the results. Let's see if it works. And there it is. So based on the places ID that we retrieved from the first coded action, we made a second API call, and in this case we got a company domain name from the results from the Google Places api. Um, so this is really cool. Now we have a little functionality that is going to allow us to retrieve additional information from the Google Places API based on the company name and any information that we have from the address. Now in this case, we're using it to retrieve the company name, but the Google Places API has a lot of additional information that you might want to store in your CRM as well.
If you want to learn more about CRM development or CMS development or any of the cool stuff that you can do in hotspot, make sure to follow me or Bright Digital. Have a great day.
Now what I did is I created a workflow using custom code actions. However, if you do have the time, you could also create a public app and create custom workflow actions to create the same functionality. In this workflow, we will use the trigger company name is known and company domain name is unknown. So we know that any of the companies that will be enrolled will not contain a domain name but will have a company name. You might want to enhance this trigger by making sure that we also have a bit of address data available, but in this case for the video, I'm going to use this specific trigger. Now the first thing we have is a custom code action, and once again, this could also be a custom workflow action, um, which contains a secret. And this secret is the API key that we need to make API cost to the Google Places is api.
Now what we have as well is a bench of properties that we will use in our API call. We have a company name, we have a city, we have a zip, and we have address available in this case. And in our code, we are using aios to make an API call. We are including the values of these profit properties that we set above and we will build a query based on the values that we have available. So we know that our company name is available, but I added a little statement to make sure that we only include the city if it, uh, if it has a value. And I'll show you the result of this query in a second. The next thing we do is we will use Axios to make an API call to the Google Places API using the tech search endpoint and we will include our query and the API key
From the Secret Store. In this specific coded action, we are using a get request and we might get a response. The structure of the response of the Google Places API is that we will get a response with a data object and an array of results because we might get multiple results depending on the query that we used. We have a little if statement to make sure that we do have results available. And if we do have results available, we're going to pick the first result. You could improve this functionality to by adding additional filters to make sure that you are, uh, picking the correct company. But in this case, we will go ahead with the first result available. We have a little look so I can view the results better in the, uh, test of our workflows. And then we will return the place ID of this specific results back to our variable called company id.
And if you scroll down, you will see that I'm using the company ID as a output for this specific coded action. So if I were to test this specific, um, workflow and run the code, you'll see that I am using this specific query. So this is passed to the Google Places API as a query. We have name City Postal Code and address. And then you'll see that I get a result, which will contain a place id and the place ID is used in the output of this workflow. Now if I test the same with our other company called HubSpot, then you'll see that we get an additional result with a different place id. Now with this workflow, we do not have the domain available yet. That's why we have a second coded action to retrieve additional information based on the Google Places ID that we retrieved from the first coded action.
So let's take a look at this code. In this custom code action, I'm using the Google API key. Again, I'm including the output of the previous coded action and I'm also u using the company name to make my console logs a little bit more readable. Um, I'm making sure that we have a company ID with a value and if we do have a company ID available, I'm going to make a new API call to the Google Places api. But in this case, I'm using the details endpoint and I'm passing it. The ID are retrieved from the first workflow. Now I might need that value. So let me go back to the first coded action
And make sure that we have a value available. And if you test a coded action, HubSpot added a real marsh functionality that you can set the value you want to use for a outputted feal. So in this case, I'm going to use prior digital again and I'm going to pass it to Google Company id. And if I run this coded action, we will make the API key. And if we're lucky, we will get a website from the results. Let's see if it works. And there it is. So based on the places ID that we retrieved from the first coded action, we made a second API call, and in this case we got a company domain name from the results from the Google Places api. Um, so this is really cool. Now we have a little functionality that is going to allow us to retrieve additional information from the Google Places API based on the company name and any information that we have from the address. Now in this case, we're using it to retrieve the company name, but the Google Places API has a lot of additional information that you might want to store in your CRM as well.
If you want to learn more about CRM development or CMS development or any of the cool stuff that you can do in hotspot, make sure to follow me or Bright Digital. Have a great day.
π Using the Google Places API to enrich your company data in HubSpot
If you ever had the issue that you had multiple companies that were missing the company domain name then this video might contain the solution you need.
By using the Google Places API, you can search for a company based on the company name, and any of the data that you have of the company address. This will give you a 'Place ID' that you can use in the Google Places API again to retrieve additional information about the company.
This will allow you to retrieve a domain, but also retrieve any of the additional data that Google Places is offering, like opening hours, and store it directly in your CRM.
Let me know what data you would use from Google Places!
More Builds Like This One
Video: Sales Pipeline Prep for 2023 Part 2
By: Amber Mizelle
π
It's the most wonderful time of the yearπ Prepping for your 2023 HubSpot forecast Part 2! Last week I shared some tips for how to st.
Video: Zapier and OpenAI
By: Ryan Gunn
Now that Zapier is integrated with OpenAI, it opens up a smorgasbord of new possible #hubspottipsandtricks! Here's something I was messi.
Video: Review Company Data Quarterly
By: Ryan Gunn
Do you look at your most important clients on a quarterly basis to see how business is going? You should. Unfortunately, Hubspot doesn't.
Video: A/B test an email in workflows
By: Ryan Gunn
You can easily A/B test an email to try out different subject lines or design elements. But what about testing send cadence of an email .
Video: Use Custom Objects to Surface Contact Info
By: Ryan Gunn
Hubpot's Custom Object tool has limitless use-cases, but one way you can use it is to save your sales team some clicks by surfacing impo.
Video: Use tickets to manage invoicing
By: Amber Mizelle
HubSpot users - How does your Accounting team know when a sales rep just moved a deal to Closed Won and they need to review it for invoi.
Video: Best practices to manage deal close dates
By: Amber Mizelle
Are the deal close dates a mess in your pipeline(s)? Are they inaccurate or has the close date passed, but the deal is still open? HubSp.
Video: Sales Pipeline Prep for 2023 Part 1
By: Amber Mizelle
It's the most wonderful time of the year π β It's time to fill out your HubSpot sales goals and forecasting metrics for 2023 and update.
Video: Chatgpt is Coming
By: Connor Jeffers
#Chatgpt may not take all of our jobs, but its definitely coming after Max Cohen π§π» and Robert Jones. Memes are what it does best.
Video: Remove Properties from Views
By: Amber Mizelle
If you've ever tried to archive a property from a HubSpot portal, you know that you have to remove it from use before it can be archived.
Video: Managing Customer Lifecycle with Multiple Sales
By: Amber Mizelle
Not all B2B companies sell 1 solution or only sell to their clients once, so one of the biggest issues that my B2B clients run into in H.
Video: Calendar View for Scheduling Meetings
By: Kyle Jepson
There's now a calendar view when you schedule meetings inside the CRM. #HubSpotTipsAndTricks
video: Build a Lead Routing Workflow
By: Carsten Brendel
Are you responsible for sales or are you the managing director? Then hopefully you're already using lead routing. If not, here are the e.
video: Why You Should Document Your Builds
ππ»ββοΈ Remember to create naming conventions, descriptions and documentation, kids! Inspired by βs super version of this super meme:
video: Sequence Builder Glow Up
Guess who got a glow-up to start the new year π
πΌ The HubSpot Sequence Builder 𧑠Well, the updates to the interface actually happened .
Video: Export the Full History of a Contact
You can now export the full history of individual contacts #HubSpotTipsAndTricks #HubSpot #CRM
video: Using the Record Overview Tab
By: Moustafa M.
This NEW (somewhat hidden) Hubspot feature can save your team TONS of hours. In our latest #hubspot_powertip we dive into overviews whic.
video: Access Your Marketing Email Analytics in the Custom Report Builder
You can now access your marketing email analytics in the custom report builder! (Also, a surprise shoutout to my friends in #Australia) .
Video: Migrating Blogs with Dynamic Pages
By: Teun Rutten
π Migrating multiple HubSpot Blogs to HubDB with dynamic pages In this video, I'm going to showcase a website we optimized for our fant.
Video: Book Over Calendar Blocks with the Meeting Tool
By: Kyle Jepson
This update to HubSpot will help sales and CS reps book meetings on the spot - so useful!
Video: How to Clone Products
By: Kyle Jepson
You can now clone products #HubSpotTipsAndTricks #HubSpot #CRM #Sales #SalesEnablement
Video: Best Practice for using the Forecast Tool
By: Alex Enache
If 2023 is the year when you want to put more structure in your sales team's processes and truly take forecasting to another level, you .
Video: Manage Updates on Import
By: Kevin van Beers
Running imports in HubSpot just became a little cooler! π When importing records into the CRM, you can now specify that you want to onl.
Video: Audit Properties with Data Quality
By: Amber Mizelle
Creating a new property is pretty simple in HubSpot, but how do you know which ones aren't being used so you can remove them? If you hav.
Video: Apply Presets to Entire Teams
By: Kyle Jepson
You can now apply presets to entire teams! #HubSpotTipsAndTricks #HubSpot #CRM #UserManagement cc
Video: And Filtering in Index Views
By: Kyle Jepson
big update to filtering the Index view in HubSpot - no more making active lists just to have the OR filter option! fantastic update
Video: Our Favorite Integrations
By: Juan Jaimes
Unleash the power of HubSpot with these essential integrations brought to you by Juan Jaimes π Hubspot is an all-in-one marketing, sale.
Video: Filter and Search Meeting Links
You can now filter and search your list of meeting scheduling pages #HubSpotTipsAndTricks cc