FileMaker tips, techniques, and news.

By Brendan McBride  Posted on  March 21st, 2018  in  FileMaker, Free Downloads

FileMaker HubSpot Integration

HubSpot is an online marketing and sales tool that helps convert leads and close customers. HubSpot reported that total revenue was $375.6 million in 2017, up 39% compared to 2016. Many companies with both HubSpot and FileMaker find themselves ending up having to do double data entry from one system to the next. We will demonstrate how you can eliminate the hassle of manually copying the information by integrating your FileMaker solution with HubSpot.​

Creating a Free HubSpot Developer Account

The first step of this integration is to create a HubSpot developer account. Once you have an account, you will then need to create a new public HubSpot application. Under the application details, at a minimum for our example you will need to check the Basic OAuth functionality and Contacts options.

Hubspot Developer Account Setup

Those will allow you to use the OAuth authentication and interact with the end user's HubSpot Contacts. Also, copy the Client ID and Client Secret from the application. You will need this information later.

Hubspot LogoAuthenticating with HubSpot Using OAuth 2.0

Once you have your API information, you will need to authenticate your solution with the HubSpot API. For any questions regarding how requests should be built, please reference the HubSpot API Documentation. To authenticate your solution, place the user into a web viewer at the API authentication screen. This will prompt the user to log in with their own credentials and choose the account to allow your solution to make the connection.

FileMaker HubSpot Authentication

Once they have agreed, they will be sent to the address specified in your Redirect URI that was passed in the authentication request. When the user is redirected to the new address, the address will now have a URL Encoded parameter, which will be the code needed for the next step.

Set Variable [ $code ; Value: "https://dbservices.com/?<strong>code=058baec5-cfd7-42ae-b3ea-c0683fa4b6b5</strong>" ]

Once you have extracted the code, you will use the code provided, along with your ID and secret to get your access token which will be used to make any API requests.

Making Requests and Parsing the Response

Many of the HubSpot API requests require additional parameters. The Create Company request, for example, is a POST request which requires additional fields like the company, description, and many other optional settings for the company. These fields will need to be JSON-encoded text, passed as the parameter.

Set Variable [ $cURL ; Value: "-X POST
                               --header \"authorization: Bearer 
                               --header \"accept: application/json\"
                               --header \"content-type: application/json\"
                               --data @$data" ]
Insert from URL [ Select ; With Dialog: Off ; $result ; "https://api.hubapi.com/companies/v2/companies" ; $cURL ; Do not automatically encode URL ]

Once a successful request has been made, a JSON encoded response will returned. You will then be able to use the function JSONGetElement () to pull any information out of the response that you wish.

{
    "additionalDomains" : [],
    "companyId" : 725558396,
    "isDeleted" : false,
    "mergeAudits" : [],
    "portalId" : 4332469,
    "properties" : 
    {
        "createdate" : 
        {
            "source" : "API",
            "sourceId" : "API",
            "timestamp" : 1520270442248,
            "value" : "1520270442248",
            "versions" : 
            [
                {
                    "name" : "createdate",
                    "source" : "API",
                    "sourceId" : "API",
                    "sourceVid" : [],
                    "timestamp" : 1520270442248,
                    "value" : "1520270442248"
                }
            ]
        },
        "description" : 
        {
            "source" : "API",
            "sourceId" : null,
            "timestamp" : 1520270442248,
            "value" : "Database Services",
            "versions" : 
            [
                {
                    "name" : "description",
                    "source" : "API",
                    "sourceVid" : [],
                    "timestamp" : 1520270442248,
                    "value" : "Database Services"
                }
            ]
        },
        "hs_lastmodifieddate" : 
        {
            "source" : "CALCULATED",
            "sourceId" : null,
            "timestamp" : 1520270442248,
            "value" : "1520270442248",
            "versions" : 
            [
                {
                    "name" : "hs_lastmodifieddate",
                    "source" : "CALCULATED",
                    "sourceVid" : [],
                    "timestamp" : 1520270442248,
                    "value" : "1520270442248"
                }
            ]
        },
        "name" : 
        {
            "source" : "API",
            "sourceId" : null,
            "timestamp" : 1520270442248,
            "value" : "DB Services",
            "versions" : 
            [
                {
                    "name" : "name",
                    "source" : "API",
                    "sourceVid" : [],
                    "timestamp" : 1520270442248,
                    "value" : "DB Services"
                }
            ]
        }
    },
    "stateChanges" : []
}

For example, you can get the newly created company ID by using the following set of functions:

Set Variable [ JSONGetElement ( $result ; "companyId") ]

Conclusion

Integrating your FileMaker app with your existing HubSpot account will greatly improve your business's efficiency. You can create, update, query, or delete just about any entity you would like all from within FileMaker. Feel free to contact us if you need further assistance or to discuss getting your HubSpot account integrated with FileMaker.

Are you stuck and need help with your integration? Contact us for support!

Download
Download the FileMaker HubSpot Integration File
Please complete the form below to download your FREE FileMaker file.
FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Brendan McBride thumbnail
Brendan McBride

Brendan is a certified FileMaker and web developer and is a very friendly, hard-working, and technically-astute engineer ready to solve any problem you throw at him. Brendan went to Purdue, receiving a Bachelors in Computer Science and minored in Economics.

FileMaker 18 Certified Developer
FileMaker 17 Certified Developer
FileMaker 16 Certified Developer
FileMaker 15 Certified Developer
FileMaker 14 Certified Developer
FileMaker 13 Certified Developer
FileMaker 12 Certified Developer
FileMaker 11 Certified Developer
"We were actually able to add more features than we thought would be possible within our budget. We always experienced a ‘can do’ attitude and DB Services was incredibly patient and easy to work with."
Courtney Hartman
Art Director
"The new FileMaker custom website interface is very user-friendly and easy to follow for our clients. In addition, it is much faster than the old Instant Web Publishing (IWP) interface. Thank you and all the others who have helped us out at DB Services. I am very grateful for the excellent service you provide us. Its nice to know we can call you for help if we have an issue."
Wayne Capek
President
"We needed a solution that would simplify the administration of our responsibilities under our contract with the State of Indiana. We have seen a dramatic increase across the state in the number of potential foster and adoptive parents that have begun the preparation and training process. This increase has resulted in a significant opportunity for children available for adoption. That’s a big win for everyone! And it’s all because we can refer potential parents to the proper state contacts efficiently and quickly."
Chris Morrison
Executive Director
"Thank you for all of your expertise and valuable help. I am so grateful to have found DB Services."
Linda Findlay
Owner
"Thank you for our new database system. We transitioned from a carbon copy paper based system to a digital database. The software has saved us time and money. We used to archive all our jobs in cabinets, now we can look up a job in seconds from anywhere. The software allows us to easily email estimates to our customers in pdf format. In a year there was a return on investment just from eliminating the purchasing of our carbon forms."
Todd Cartmel
Owner
"The new system allows us to create and track jobs for customers along with inventory, something we had been doing with separate word and spreadsheet files. Because it’s now so intuitive, new staff members are able to begin using the database immediately without our usual training session and ‘cheat sheets’ for getting around within the file."
Tom Andrews
President