Python Scripts for HubSpot Magic

This is a YouTube video titled "Python Scripts for HubSpot Magic" containing a detailed presentation by a speaker named Kevin on April 23, 2024. The content focuses on using Python scripts to extend HubSpot's capabilities for workflow automation, data integration, analytics, and custom solutions tailored to business needs. The presentation includes technical explanations, code examples, and real-world use cases for improving HubSpot operations and marketing analytics. The format is primarily a monologue with some brief interactions with another speaker, but George B. Thomas is not involved.
So title today for the presentation is Python scripts for HubSpot Magic. The main focus is going to be how you can use Python to extend HubSpot and solve some problems that may just not be accessible with some of the current features or just be able to solve some problems for your organization specifically. Quick intro. For me, I'm a wizard. This was made for me about four years ago when I first started learning Python because my coworkers just kept asking me to do stuff that HubSpot could not do. And so I just developed a lot, a lot of Python to solve certain problems. My LinkedIn is in there if you ever want to connect and excited to go through some wizardry. My goal for today is to get everyone excited about how they can use either Python or even Node in terms of development resources to push your organization, your HubSpot forward, or if you're a HubSpot partner, your agency. If you are completely new to development. I hope that I can just kind of get you excited to test some things out and make it really simple of how to get started. And if you're kind of a more seasoned developer, I hope to just kind of get you excited about some of the use cases that I've done and maybe hopefully some of that creativity and some of the weird use cases I've ran into might get you excited about some stuff that you'll work on. So at the end of the day, HubSpot and Python are my tools of choice. When I'm working with any company, I think that they just work really well together and I bleed orange. I use HubSpot for my business, I use it for companies that I work with and I just think HubSpot is fantastic. But I've started running into a lot of situations where I've wanted to use HubSpot for more. In terms of working with companies, it covers sales, marketing and service incredibly well. But I've actually ran into a lot of situations where client or customers want to use it for their entire organization, or they want to use it to run operations for their company, or be able to integrate with a specific software. And so by using Python, I've been able to either give them some more control over their data hygiene and how data works together. I've been able to integrate software that typically doesn't have native integrations, and in some cases I've been able to do some analysis that just isn't capable in reports, and all three of these have been able been tools that I've used with Python to just provide some extra value on top of HubSpot, here's some quick use cases that I mentioned on LinkedIn that I've worked on that have been really just fun projects and some examples of some of the weird ways that I've used Python for one situation with a client, I was able to help them manage about a thousand events to date all through HubSpot. So they run their entire event management company through HubSpot and track their sales, marketing and even customer support through there. We've been able to make a applicant tracking system inside of HubSpot for a client. I've been able to make a script that like basically create or replicates a HubSpot for like acquisitions and separations of companies. Been able to make some asset tracking integrations inside of HubSpot to manage inventory, been able to make a Marketplace for doing W9 contractors like Uber and do invoicing and billing out of HubSpot and then even done some custom marketing attribution. These are just some use cases again just to cover some stuff. I tend to just follow what gets me really excited in terms of using HubSpot and so these tend to be more custom and exciting projects. But whatever you end up doing with Python tends to be what gets you excited. Without further ado, I'm going to go through just some beginning tools where you can get started at. Then I'm going to go through some scripts that are examples from most beginner to most advanced in that order, some quick tutorials on just getting set up, and some tools that you can use. There's typically just four steps when you're looking to set up Python on your computer. I put an article in here that just has a blog post that I wrote way long ago and you can read this if you want to. Takes like 10 minutes to set up your python on your computer. Typically you need to download it, install libraries which is pip, and then install some of the basics and then just get a IDE which is like a development environment. This will let you run your code and just check that it's all right. I love pycharm, I've just been using that for years. But just some quick tools. Pycharm is awesome for validating your code and making sure it works and just getting the reps in code by zapier is fantastic for running code on an instance inside of zapier just to manage data very quickly without having to deploy code. I typically if I do have to deploy code I'll use Google Cloud functions. I very rarely have to do that just because Both Zapier and HubSpot custom actions cover a lot of bases. I tend to put a lot of code in the Operations Hub to run it. So that's that custom code piece. And I will send the slides later. And then finally, zapier has some webhook options that are really fantastic for running code really fast and being able to just manage data very easily. So just to run through these real quick, pycharm is a development environment. It'll help you validate your code. HubSpot, I'm going to slow down here. HubSpot tends to give you a lot of access to their APIs through a feature called the Private Apps feature. This is a way that we'll come back to as we're getting started on some of these Python script examples, but this is basically a key that allows you to access your data and control whether or not that key has access to specific data. And I'll go through that a little bit later. Kind of a quick overview. Webhooks tend to be incredibly helpful when you're building Python and building integrations with other tools or just with HubSpot. The private app inside of HubSpot is incredibly useful for this because it allows you to make web hooks when you change data inside of HubSpot, and when you use that with Zapier, you can also run code really fast, which I'll talk about in a little bit. Code by zapier, like I mentioned earlier, is a place you can just kind of house code if you need to. There's a feature that I'll go through as we get a little bit further that allows you to run this Python inside of zapier if you need to, which is just helpful for integrating tools or running stuff outside of HubSpot. And then as we all know, Operations Hub Professional is incredible for being able to run custom code inside of HubSpot and be able to run that inside of workflows on every object that runs through that workflow. And then finally, Google Cloud helps if you have like a ton of data that you need to run. I tend to try not to use it as much as possible just because Zapier and HubSpot custom code actions run pretty easily, are a lot easier to configure, and really you only need something like this if you're making a custom card or you're running something that takes longer than 10 seconds. Before we get started, I just wanted to go over some helpful definitions of some code concepts. If you've never really gone over coding if you're in the Developer hug. You probably already know a lot of these, but I'll just go through them real quick. Lists Inside of Python is basically a list of items that you store in a specific order. It's super helpful for ordering and handling large amounts of data. In this case we just have a list of names. This can hold either numbers, it can hold strings, and that's super helpful. Dictionaries are a little different in the sense that they're a group of items that have basically an address book. So you can say, hey, I have this value and I want to get the corresponding value associated with it. In this case, on this example there's a dictionary for state capitals and when we pass in the state for Arizona, it'll give us Phoenix. And that just helps us as we're looking up data so that we can figure out the corresponding value associated with it. Same thing with. One of the best ways to think about this would be to think about it in a concept of a pipeline, in the sense that, as you see here, there are names for these pipeline stages, but there's an internal ID on them. That's a point where, Sorry, one sec, got to share my screen. There's a label on the stage here. And then this ID has that internal id. Another important definition is requests. Requests is basically you're just sending data to another server. And this is something that allows you to either call the HubSpot API or call another tool and get data, send data, or even delete data. And then the last two definitions. An if statement is basically a statement in code that allows you to run code if a certain condition is true. It's helpful for branching to complete tasks on different outcomes. And so in this case we're checking if the number is five and then printing the output of that. And then finally for loops, go through a list or basically of data and, and complete a list of outcomes based on that information. And then one last one is functions are basically a repeatable method that you can define in advance with both an input and an output and then reuse over and over again. In this case, we're putting in a piece of information, we're adding seven and then we're printing out that value. In this case that'll be 12. That is just a quick overview of some of the more development oriented stuff. Then let's go through what it looks like to get started. These pieces of code are going to be on top of everything that I'm writing and showing you here. In this case, there's just some typical libraries you want to use. When you're working with a script inside of HubSpot, you can. You tend to want to use these three most often, which is the OS library that allows you to get your keys, which you can't really access data without requests is incredibly important. If you are able to use the request library, you can basically send data and receive data incredibly easily and manage that very quickly. And then the HubSpot API is just incredibly helpful and a great place to start if you're a beginner. Like I mentioned earlier, there are keys that we need to manage as we're trying to access specific pieces of data. When I'm building code out, I'm either accessing that from my computer or I'm accessing it from the operating system inside of HubSpot. In this case, I'm just showing a quick line of code that I use that will pull that key down and also allow me to use it inside of HubSpot. By putting it in these headers, I'm able to access that information and send it with every request, which tells HubSpot that I'm not trying to steal data and that it is actually my data. In terms of inputs, HubSpot custom actions and HubSpot or code by Zapier takes in inputs from two different ways. HubSpot custom code actions takes it in as an event. As a event. And I'll show that as we're making some of these custom code actions and then code by zapier does it through a dictionary and then finally just kind of a best practice as you are going in and building some of these custom coded actions, you're going to want to be able to define the language as Python. You're going to want to put a description, you're going to want to pass your token in, and then you're going to want to pass your variables in. And I'll show this as an example as we go through a specific script, now that we've got the details or an overarching understanding of just Python as a whole, I'm going to go through some of the use cases that I've used some of these scripts for. The first one would be workflow automation. I tend to use custom code actions pretty aggressively in my work and and so gonna go through a quick one which is creating line items from a product offering bundle. So in this situation about like two years ago, I had a client who ran their entire business off of bundles and it had a situation where you would have 20 products inside of HubSpot and you wouldn't be able to reasonably make sure that they all had the same pricing and the same discounting for every single bundle. And so what the client had asked me to do was to build a dropdown inside of HubSpot so that we could access this information and just very quickly build all the line items on a deal so that the salespeople weren't worried about it constantly. And so in this situation, what I ended up doing was I built a dropdown called a product offering. I made it a multiple checkbox field and then I added all of my bundles. In this case, I ended up using this for my business as well. And so that's what this example will be. But in this case we have all these options of we have all these options of the bundles that we have. I'm going to focus on this HubSpot sales hub setup, and in this case it's something that has about seven line items. And I just don't feel like building a quote for seven line items. And I want to make it very quick and easy. What I'll do is I will make this property and then when it gets selected, I will have a workflow that triggers when that product offering is known and will re enroll every time that is updated and then run code inside of the custom code action that will take these product offerings and basically create line items off of it. I'll go through that a little bit. For the first step of this, what we're going to need to do is we're going to need to pull Data into the HubSpot custom code action based on what information is being provided. In this case, what I'm doing is I'm pulling Both the deal ID in this case just 1, 2, 3, 4, 5, 6 and the product offering. In this case It'll just be HubSpot SalesHub, but in some cases it could be a ton of different offerings. This is something where we can just continue to add maybe six bundles. What we need to do is we need to define a main function inside of that custom code action and we need to pull this information in. Typically it's done in this dictionary and we just need to run code that pulls this information in and stores it on the Python script from there. What we're going to need to do is we're going to need to make a dictionary of how these offerings map out to specific products. So in this case you can just focus on this HubSpot sales hub setup and here are the seven product IDs that I want to add onto this deal. When I select it from there, I'm going to take that input from the multi checkbox and split it out into a list from there. What that's going to do is if it sent in a HubSpot migration and a HubSpot sales hub setup, it would split it into this list. Then from there what I can do is I can go through every single offering in a for loop check and I'll walk through this a little bit easier. So here's the for loop that it starts. It'll go through every single offering that the client is interested in. It'll check if that offering is included in that dictionary that I showed you. And then for every product that is in that list of product IDs, it will create a product as a line item. So this is done by sending data to the HubSpot API and then just creating a post request over to it. Then once that gets back, I'm going to get that line item ID and associate it with the deal from there. What we're able to do is we're able to create a bundling system inside of HubSpot. I'm going to show a quick test, so you can just see some of this. But here is one of the test deals that I set up. And as you can see. Let me scroll. Not seeing line items on here. Oh, this is not a deal. Okay, so here's one of the test deals and as you can see, there are some line items on here already. I'll just delete these and then I'm going to pull over my Python code and we're going to find the product offering script. Okay, so as you can see, this is basically, it's got all the same code as what I just showed in that slide.
We're seeing that HubSpot.
Yeah, one sec, Let me share my entire screen. Thank you. While you're doing that, there was a question in the chat about using a lookup table instead of hard coding. Yes, could definitely do that. Sometimes I make these for speed of getting the thing set up for a specific client. In this case, I'm just hard coding it. You could do it through a lookup table if you wanted to. I actually was thinking about that as I was putting this sample together. You can always improve some of this stuff and build it off of searches. You could set up a product with a dropdown for the bundle and you could look up those products based on that bundle ID and pull them all in. So, yeah, that would definitely be a way to do it. One thing to note as I go through some of these scripts is HubSpot. I wrote a lot of them maybe like a year or two ago. And so HubSpot has caught up in a lot of ways, like storing custom data on products. And so there's a lot of ways that you can improve some of this stuff. So in this case, as you see, there's no line items on this deal anymore. And then we're going to run this. Take a sec. And then now it's just completed, we're going to reload. And now you'll see that it has all those line items on it for their default pricing for those two offerings. So in this case it would be the sales hub setup and then a migration. And so that's just kind of a quick overview of how to build out kind of a bundling system inside of HubSpot. Then just two notes on that. When I built this out, the client actually had asked me to run it faster. One of the ways I was able to do that was using webhooks inside of HubSpot or, sorry, yeah, inside of HubSpot and inside of Zapier. What I did was I used some of those private app webhooks to send a webhook to zapier, and what that allows you to do is run something in a couple seconds versus the time that it takes to spin up that workflow. So there's an article about how to do that in these slides. One thing to note is I made that bundle automation a long time ago. HubSpot has caught up a lot in a ton of ways. And I'll talk about that in just a moment with some other scripts. But I was able to actually use some of the new tools, not in Python, but inside of Node, to build out a bundler using a custom UI extension. So what was nice about this was while it's not Python, it's the same idea. And in this case, I was able to do it in real time versus that 7 seconds or 5 seconds, which makes salespeople more happy. Are there any questions about that last script before I go into some other ones?
I was just going to say that custom UI thing you build is pretty cool.
Thanks. Yeah, I worked for a month on that one.
Can you put that in the middle column or.
I put that on the middle column. Using some of the same stuff that I did for the code, I was able to make even a custom quote template that groups them by the bundle they're in, which helped a lot. There's a lot of different ways that HubSpot's been solving a lot of the problems I used to have to solve, which goes into some other ones. I'll do some quick overviews and if we want to wrap back, we can go in with more detail. One thing that I've made is a script that completes open tasks when a deal is closed. I'll show just a quick example of that. Actually, I'm going to do it on a ticket just because I have that code code available for me. In this case it's just not loading. In this case, I have three tasks on this ticket and I'm just going to take this ID and open up one of these scripts. Let me see if I can find which one it is, which is this task auto completion. And I'll just put this ID in and from there it'll go through and I can go through all of it. But basically it's just pulling from the HubSpot API all the tasks, it's looking at which ones are still open and then it's marking them as complete and updating it. So in this case, just so it's proof they're all open and then reload. My computer is not liking me today. Now you'll see they're all completed. And so I made that for a quick situation where a client needed to close tasks that had been made for the future when a deal had already been closed or a ticket. Another situation that runs on the same type of code is something to change task owners when a deal owner is changed. And so in this case these are these three tasks. One is assigned to me and completed, which means we want to ignore it. Another or two others are assigned to one of my team members. And in this case we want to change it from Cameron to me. I'm just going to adjust these. These are all using IDs. They typically get passed through from the HubSpot. What is it? The HubSpot custom actions, but I'm doing it manually for right now just to demo it. I did not have to just reload things. As you can see, these are all now set up for me. Now a quick notice there and here's the code that goes through how to do some of this stuff. But a nice thing about this is I made this two years ago. SuperD has basically made a tool to do this called Task Maestro, which is really cool. Now it's something where you don't have to wait for someone like me, a developer, to solve some of these problems. But what's nice is that using Python, I was able to get some of the stuff done just by myself for specific problems that I had a little bit earlier than what it would take to deploy an entire tool, which was really nice. Another great example is associating objects, which is something I use pretty aggressively. You can now do this with Associate, but one of the things that I typically tend to do is I created a script to associate two items together or two objects together. And then what I'll typically do is I'll use like a search on top of it so I can find specific items. Here's some code that goes through it. I don't want to like go too in depth because I've got a lot of use cases that I'd like to get through. But in this case what's nice is using the HubSpot API, you can look at that ID between two objects and then you can take those two IDs and associate the two. This is super helpful in a situation where you need to find a piece of data without an ID to match two pieces of data together. I'll go through some examples of that. One of the use cases I've been using it for is that I've been managing a lot of sales orders lately. And so what I'll do is I'll have the sales order, but I won't have the actual object that is associated with that sales order. So I'll search for it and then I'll assign them, associate the two objects together to match them. So in this case I'm doing it with invoices, which I'll talk about a little bit later. I'm going to skip over that for right now. This is one of my favorite workflow actions that I use aggressively. It is one of the coolest things I've made and it's very simple. Basically all it does is it creates a new property drop down option on a drop down option that already has a ton of values and a lot of pieces of information on it. I've been able to use it for a lot of different situations. I'd actually built it for a ClickFunnels integration like two, two to three years ago and I've just gotten so much use out of it because it's great for referral tracking, it's great for event management, it's great for managing jobs for our applicant tracking customer. And what I love about it is that it makes integrations really easy where in situations where you need both like a label for the team to use and be able to run with or even external customers and then an Internal ID that allows you to match those pieces of data together. What it tends to let you build is basically like a living integration that as it gets new information that is a little different or new events, you're able to bring it in and then map how that interacts, while also being able to use that internal value for one piece of information, like associating in this case for this specific client. These are marketing events that we built out. I hit it just for the customer. But in this situation, what we had was we had a contact property that had these dropdown options with the event ID as the internal value. What we were able to do was we were able to make an external form that customers could fill out and then it would immediately look up that event and associate those two objects together so that we could basically make automation for every single event just once and never really have to change anything except making a new object. I'll go through some of this code at a pretty high level, but in this situation, one of the first things you need to do is you need to pull the property that's already existing, which basically you're going to just use the property, Read API from HubSpot and get all the options. Then from there you need another function that updates that dropdown with new options. What you're going to do is you're basically going to read it, get all the current options, add a new option, and then push it back. What this looks like when you put it all together is you're reading that property from maybe the source property on the contact level, you're getting all the current options, you're adding a new option with both your external value of, let's say, the event that the customers need to see and the internal value which the integration needs to see. Then from there you're adding that back in. One of my favorite things is with this script is we will update it again. And so we'll. Sorry, we'll update it on every single object so that we can keep everything all tight together and not cause any issues. Because in this situation, we needed it for the contact the deal and we also needed it tracked on think on the product level for this client. Any questions about that before I go through some more stuff? No question. Lots of comments of how cool it is. That's good. I'm going to go through some migrations and then I'll try to get into some analytics, not going into too much of the code just because I want to get through everything. But feel free to ask me after about some of the Details. One thing that I have a lot of fun with is I built out a 1400 line piece of code to basically replicate a HubSpot to another HubSpot. Last year I found myself making a lot of clones for people in three different situations happening. One being a company acquires a company and needs to like split the company in half so they need to get a copy of the data. Have another situation where two owners of a company are splitting and they need to retain a copy of bulk data. Both sets of data for both, mostly for like partners of accounting firms or law firms. And then the last one being we're spinning up a franchise and are not doing it like as a business unit, but we're doing it more as like a. We're giving them a copy of data and we're giving them their own CRM. So I've been, I had been doing like three of these last year and they are beasts. They're just a lot of work because you have to copy over line items, engagements, and also you have to make sure that all the owners line up despite having different IDs. Something that I made just to save myself some time was a script that looks at a HubSpot with all the properties and all the line items and copies it all over to another HubSpot so that we can create these clones really fast. What's been fun about this is now it takes me like 10 minutes, which is really cool. And so and for me the, the reason I did this was in every situation that this has happened, it's been in a situation where a client is really stressed out and like the time it takes to get something done makes a big impact on their well being. In one client's situation, like they were closing the papers in like a week and they needed to like separate their company within a week. And so speed is really important in this situation. And so that's why I built it out that way. Another example of kind of a something that I built out just because a client was in distress and I needed to solve a problem for them was a Gong migration which turned out to be quite a difficult project. A client was canceling their Gong account because of the cost and they had had 30,000 recorded calls that they would no longer have access to. They were freaking out about it and I wanted to see how I could help in this situation. There is no way to natively move all that data inside of HubSpot very easily. There is the GONG integration which will leave notes to the links in Gong, but all the data is still in Gong. And so if you cancel that, you begin to lose access to it. And so what I tried to do was use the native calling tools inside of HubSpot to allow playback using those calls and also make sure that they're retained on the deal. So in this situation, what I did was I pulled all the Gong calls. Luckily, Gong let me export the IDs, and that was really easy. And then from there, I used the API to get the raw audio file link. I then created using the notes on the native integration. I made like a map. I said, this is the Gong id, this is the call id. And I did that just using some spreadsheet, but you could use that using Python. And then I tried uploading these 30,000 files one by one just off my computer using the HubSpot File Upload tool. It took me a full day, like a full 24 hours to do 5,000. It was December. I was trying to celebrate Christmas. What I ended up doing was I found that HubSpot lets you just upload a file from a link, which is incredibly useful. What I did was I rewrote the code to use this, and it allowed me to just say, hey, HubSpot, here's the link to these 30,000 calls. Can you upload them? And they gave me like a ID for me to find it later. This let me do 30,000 in like a day, which made my life a lot better. From there, I used the API to put that ID back in and get the new URL inside of HubSpot. And then I went through that map that I told you about and updated the recording URL on every single HubSpot call so that it would start processing it. What was awesome was HubSpot's call intelligence made a transcript and, like a recording off of this URL that I gave it. And I also was able to keep it private, which was super important to my client because it was client calls. And just because of how HubSpot set up, it worked out. Another example of kind of a tougher one was doing a Salesforce file migration. In this situation, a client's moving from Salesforce to HubSpot and they needed to move over all their files and contracts. What I did was I exported the files from Salesforce, which you can just do from the exporter, but it'll give you. I don't have it on my computer right now, but I do have a screenshot. It will give you something that looks like this, which is just a ton of contract files that you don't really know if it's a PDF, a text, or anything, and then it'll give you a CSV of what opportunity in Salesforce they're attached to. What I did was I reformatted all of this. I wrote some Python to go through every single file and then what I did was I uploaded those files using the same code I used for Gong luckily, and then I created notes on every single deal with the attached file id. What this did was it allowed us to put all those PDFs on those deals inside of HubSpot, which is not covered from the native Salesforce integration. That helped out a lot. A couple other items to go through. I don't have as much detail here, but for some integrations like I mentioned for that client, we were able to build out an event management system inside of HubSpot. I started using the Marketing events object in the API for that. What was really nice was we were able to basically build some code that looked up that marketing event based on that property dropdown that I talked about earlier. You couldn't associate these at the time. What it would do is it would pull it into that contact and then run automation based on the date of the event, the venue of the event. It would run off of basically date management email automation based off of that information. We've sunsetted this a little bit to start using custom objects because it's just so much easier. But what was nice was Python allowed me to solve some of these problems a lot earlier, before custom objects started to replace some of this event management tool or event or, sorry, custom objects tool. And so that was super helpful. Another situation that I've been doing a lot of lately is netsuite integrations. I've been. One of my clients wanted to buy HubSpot to move off Salesforce because they don't like Salesforce. And the big issue was NetSuite and tracking how orders fulfill and being able to see individual assets inside of HubSpot and what status they're in so that their team can communicate from HubSpot and from Netsuite at the same time. And so I've been able to use custom objects to manage inventory and shipping addresses and basically build kind of a CPQ process that sends to multiple shipping addresses inside of NetSuite and also allows customers or sorry, not customers, allows the team to fulfill out of HubSpot. All right, any questions before I go into some of the analytics stuff that I've been working on?
I think just keep going. We're here for it.
Okay, cool. So I Always like looking for how HubSpot can help with any situation. And so as I used to be a marketer, building the understanding of how marketing is helping sales is tough. Sometimes it's not as easy as like, you know, we brought this lead in, this is revenue. Sometimes it's like reducing sales cycle, it's reducing the amount of touch points it takes to close a deal. And so I always love getting that analytics as much as possible in this situation. What I did was I, a client, wanted to know the number of sales emails it took to close a deal, the number of calls, the number of meetings, and the amount of marketing interactions per close. And so what I did was as a deal closed, I pulled all the contacts in, I pulled all the events from web traffic from those and emails from those contacts. I counted them all up after filtering the ones that happened before the close of the deal because customer success will send emails afterwards. And then I pushed it back onto the deal. There's some code in here that explains how to do this. In this case, you're getting all the engagements, you're getting all the engagement data so you can get the date that it occurred. You then compare that to prior to close date of the deal, and then you count it all up and then you just send it back. And so that gets you a very nice chart that lets you see how many touch points it takes to close a deal from marketing or from sales emails. Another example of something that I've just made for myself is I am driven crazy by how property history works inside of HubSpot. I do not like horizontal spreadsheets. They are difficult for me because what ends up happening is you get one record with like 100 columns and another record with two columns and it just is very difficult to manage. What I did was I wrote a script that will pull all the property history for a specific stage for an object, not stage specific field for an object. This helps us a lot with backlogging information. When we have clients that haven't worked with us in a while before, it allows us to pull some of that data out from the back end into the front end for reporting and for use in automation. It also helps if we ever mess up because everyone's made mistakes with HubSpot in terms of an import that goes wrong or a workflow that just updated everything wrong. What this helps me with is I can actually pull all this data. I can see when something happened. So let's say I made a huge mistake that just messed up all of our data. I can say Well, I know the date it happened. I can select all that information, pull it out, and then only update the most recent information. And that allows me to look like I don't make mistakes. And it's also been super helpful for benchmarking, benchmarking clients. Not every client uses deal stages. Most don't actually. And so it's hard for someone who does operations or runs a HubSpot agency to prove the value they're providing. In our case, what we did was we used that property history, workflow or script to pull the status or the status that our client was using instead of deal stage and get valuable conversion data and time data on how long it took to go to certain stages and convert to certain stages, which would be in this case these stages at the top. We were able to benchmark the client on their current conversion prior to us working with them. Then we were able to set a cut off date like in a cohort analysis of when we started working and see the impact of our work. And this was really helpful because this helped us make some case studies for the client where we were able to take a process and reduce it from 34 days to 12 days and then increase the conversion of it by 24% at the same time. And so what was awesome about that was one, we were able to prove value to the client, which is really tough when you're in operations. And two, our client is also, he's like, he's the head of operations. He was able to show his CEO this and really communicate the value of the work he was doing. And to say he got a promotion would be an understatement. In the same way we've been able to build cohort analysis deals for at least the enterprise level, they take time to see changes in process, they take time to see shifts in conversion. And so it's hard to see how the whole funnel changes. You could increase close rate at this very last stage and just mess up the conversion at one of these stages. What is nice about some of this stuff is you can see on each row the exact conversion as time goes along. In this case, the qualification of these deals got tighter. And then let me see if the close rate went up, close rate went down. But it's just helpful to take a look at how. One sec. How process changes affect the funnel. One other thing for the same client is the client had asked, their CFO had asked what percentage of new pipeline value closes in each month after the deal gets created. And we were able to get that. It's an 8% for the first or for the same month, 8% for the second month, and then 4% for the third month. And it just keeps going down. And they were able to use that information inside of their financial reporting, which helps them hire a little bit earlier and just make sure they run their business a little bit better. Got two last ones, then I'll wrap it up. Another one that I have a lot of fun with. I mentioned it earlier with touchpoint tracking, but marketing attribution is really fun. It's wildly complex and tough to nail down. One of my clients was struggling with it and so what I did was I built them a custom marketing attribution script that as a deal closes or as it gets created, it will pull all the events from the contacts in terms of, you know, sales, emails, interactions on the website. And it will actually pull all those interactions so that we can label them and then be able to adjust them based on certain rules that we have that are different from HubSpot. Then what was nice about this and the reason we built this out custom is we were both able to add in branded search G2 reviews, some stuff that was really important to them but just not picked up, typically because it was more customized to them. And then two, we were able to do this for multiple metrics. Sometimes things in marketing aren't as black and white in terms of it made revenue. Sometimes you want to know what's the close rate and what's the impact of close rate based on the, you know, one specific touch points? What is the deal velocity of a specific touch point? And, and so what was nice about this one, we proved that email marketing is just monstrous, which is not new. We were able to show that organic search is pretty. It closes deals really fast and closes a large percentage of it. And we were also able to show that the trade show conversion rate, which is this red, wasn't as great as we imagined it would be. And so the client adjusted budgets to go more digital versus trade shows. And that helped. And then finally I built out a script to analyze deals and see what specific properties out of every property impacts close rates and deal velocity. And the reason I kind of got inspired for this was one of my clients was doing ERCs and they had this hunch from across the entire company that democratic states got more money from the ERCs, closed at a higher rate, closed faster. And so I wanted to track it and like give them that insight. And so what was nice was we, I did like 10 hours of research in their HubSpot and was able to show that, like, the deal velocity was like, three times the other states. And what was nice about this was it was no longer a hunch, it was true. And it was something they could put money towards. And so with the kind of the same idea, I was wondering, well, how many of my clients have these insights that are impossible to really know unless you have that hunch? And so what I did was I built a script that pulls every single property from deals, pulls the deal velocity, and then looks at what factors adjust close rates and deal velocity based on how statistically significant it is. And so it tends to be specific team members that are high performers. It tends to be specific channels. Like, I mean, everything comes back to marketing attribution. And then sometimes it's weird stuff where it's like, oh, it's the state that it's in. So if all this is exciting to you, some places you can start are Codecademy. That tends to be one of the coolest places to just learn stuff. My background is computer science, but I go to Codecademy when I need to learn stuff and get better at stuff. It's just super simple and easy to understand. And then Data Camp is awesome. But that's if you want to do some of that advanced analytics stuff stuff. And I probably wouldn't start there. That's when I need to get, like, when I need to learn stuff. And that helps with, like, a lot of marketing analytics and machine learning. So I'd probably recommend Codecademy to anyone that's, like, starting out. There are some great courses on HubSpot's academy too. And then once you get kind of the bearings on it, what I would recommend is look at the HubSpot documentation, find a problem that you're really struggling with in your business and see if you can solve it. Doing that will teach you better than any of this. So, yeah, that's all I have for today.
All right. And with two minutes to spare. Thank you, Kevin, so much. We have 23 questions in the Q and A. How are you feeling about getting through that in a minute and a half?
Probably won't. My bad. No, that's fine.
So if people want to get a hold of you, it Sounds like maybe LinkedIn is the best way if they want to get in touch.
Yeah, LinkedIn's great. Cool.
Well, thanks, everyone for being here. Thanks, Kevin, for coming. It seems like people enjoyed it. Deanna has just dropped Kevin's LinkedIn URL in the co the chat, so grab that. But I think we will go ahead and shut it down here.
Okay, thanks everybody. Take time to see shifts in conversion. And so it's hard to see how the whole funnel changes. You could increase close rate at like this very last stage and just mess up the conversion at one of these stages. And so what is nice about some of this stuff is you can see on each row the exact conversion as time goes along. So in this case, the qualification of these deals got tighter. And then let me see if the close rate went up, close rate went down, but.










