Loading...

Creating a custom agent tool in HubSpot helps you automate workflows and tailor interactions to your business needs. It enables you to extend HubSpot’s functionality while improving efficiency and customer experience.

In this blog post, we’ll explore how to create custom agent tool in Hubspot

Prerequisite

  • Hubspot Developer Account
  • Basic Knowledge of node.js, and REST APIs

Steps to Create Custom Agent Tool in Hubspot 

Step 1: Create HubSpot Private App.

HubSpot->Settings->Integrations->Legacy App->Create Legacy App->Private App

image scaled

Enter the name of the app.

image 1 scaled

image 1 1 scaled

In Scopes select the scopes

image 2 scaled

  • Click on Create App.

  • Copy the Private App Access Token

Step 2: Set up the environment.

  • Install or update the HubSpot CLI by running the following command on the command prompt: npm install -g @hubspot/cli@latest.

  • Authenticate the test account by running the hs account auth command in your terminal.

Step 3: Create a Project.

  • In the terminal, run the command hs project create to create a new project.

  • Follow the terminal prompts to configure the project name and location, then select a template.

  • For the purposes of this blog, select the private app with static auth and select the features you want in the app.

Step 4: Add an agent tool to the project.

  • If your project doesn’t have one yet, create a workflow-actions/ directory in src/app/.

  • In the workflow-actions directory, create a new JSON file for the tool configuration. The file can have any name, but must end with -hsmeta.json (e.g., my-agent-tool-hsmeta.json). 

Step 4

Step 4.1

Step 4.3


Step 5:
Backend endpoint and .env file.

search_contact_by_email.js:

Step 5

Step 5.1

Step 5.2

.env:

Step 5.3

  • Run npm install express axios dotenv and npm init -y  command in command prompt to install necessary files 

Step 6: Run the project.

  • Run node file-name and npx ngrok http 3000 (if running on a local machine/laptop)

  • Copy the forwarding url and add this as action url in tool configuration JSON file 

Step 7: Deploy the project.

  • Run hs project upload command in terminal

Step 8: Testing agent tools in HubSpot.

  • HubSpot provides two primary methods for testing: the workflows tool, and the developer tool testing agent.

Test with workflows.

  • Create a workflow.

  • Add your tool as a workflow action.

  • Ensure you’re passing the inputs and outputs you want to pass, then execute the workflow.

  • Iterate on your back-end code to ensure the logic is properly handling the inputs and returning the expected outputs.

Test with the developer tool testing agent.

  • Navigate to the Developer Tool Testing Agent in the HubSpot Marketplace.

  • Click Sign in to add to navigate to the install page in your account.

  • Once in your account, click Add to install the agent.

  • In the pop-up banner, click Configure. Alternatively, you can click Open to open the agent page, then click Configure in the top right.

  • In the What this agent can access section, click Add tool.Step 8
  • In the right sidebar, select your agent tool.
  • With your agent tool added, you can now begin testing your tool by adding a prompt to the Your message field, then clicking **Test agent.

Conclusion

Building a custom agent tool in HubSpot empowers you to streamline processes and create more meaningful customer interactions. With the right setup, it can significantly boost productivity while helping your business scale efficiently.

For businesses looking to go beyond basic automation and implement advanced, scalable solutions, leveraging expert-led Salesforce Services can make a significant difference. With the right guidance and support from HIC Global Solutions, organizations can seamlessly integrate AI-driven tools, optimize workflows, and build high-performing customer engagement systems tailored for long-term growth.

Watch Live Demo

No Data Found.

Related Articles
Salesforce B2B Commerce Cloud A Step by Step Implementation Guide 1

B2B buyers have changed a lot over the last few years. They no longer want to call a sales rep for every small order, wait for a quote, or go back and forth on product availability. They expect the same ease they get in modern online shopping, but with B2B-specific needs like negotiated pricing, account-based […]

Read More
How to Manually Sync Salesforce to QuickBooks Using the Sync Button 1

Integrating Salesforce with QuickBooks Online (QBO) allows you to manage your financial data directly within your CRM. The Sync Button provides a simple and effective way to manually send Salesforce records to QuickBooks whenever needed. This is especially helpful when you want instant updates or prefer full control over which records get synced. Why Use […]

Read More
Mastering Pattern and Matcher Classes in Salesforce Apex for Advanced Text Processing

AI Agents are no longer a futuristic concept inside the Salesforce ecosystem; they are rapidly becoming a core layer of how businesses sell, serve, and scale. As Salesforce continues to embed intelligence deeper into every cloud, Salesforce AI Agents are evolving from simple automation assistants into autonomous, context-aware collaborators that can act, reason, and adapt […]

Read More
Complete Guide on Sales Cloud Implementation 2026

With 72% of sales rep time going into data entry, research, and admin tasks, there simply isn’t enough bandwidth to keep up. They hit a wall sooner or later. If you’re running a sales team or just trying to get your business organized, you probably already know that managing leads, contacts, and opportunities can get […]

Read More
Comprehensive Guide to Salesforce Partner

Salesforce is transforming how businesses sell, serve, and engage — but unlocking its full potential requires the right expertise. Partnering with a certified Salesforce Partner ensures that your CRM is implemented, customized, and optimized to fit your unique business needs. These experienced professionals help turn Salesforce into a powerful ecosystem that enhances customer engagement, improves […]

Read More
Connect Webflow to Salesforce Without Writing Code

Connecting Webflow with Salesforce usually means dealing with a lot of coding, handling APIs, and fixing tricky errors. But what if you didn’t have to write a single line of code? In this blog, I’ll show you how to easily set up a secure and real-time integration between Webflow and Salesforce using a simple tool […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203239658
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818