HubSpot Programmable Automation: Boost Your Operational Efficiency

HubSpot Programmable Automation: Boost Your Operational Efficiency

Revenue-generating process automation has become essential to business efficiency, productivity and growth. It streamlines operational procedures and repetitive tasks, allowing companies to free up valuable time, minimize manual errors and focus their efforts on more strategic initiatives.

This automation is done thanks to specialized technological solutions. One of the most comprehensive and innovative is HubSpot's Operations Hub. It is a platform designed for your company to optimize its operations and scale its growth through automation, data integration and connectivity with other platforms.

More specifically, Ops Hub's programmable automation features allow you to create customized solutions tailored to your unique needs and requirements.

In this blog post, we'll discuss these special features and see how they enable you to simplify workflows and achieve greater operational efficiency.

Overview of HubSpot's Operations Hub

HubSpot Operations Hub is a powerful platform designed to help companies optimize their operations and accelerate revenue growth. It offers many features, including programmable automation, custom objects, workflow extensions, data quality automation, robust data quality tools, and data sync capabilities.

Its advanced automation capabilities enable businesses to manage and scale their processes across sales, marketing, and customer service.

Some of the primary benefits of using Ops Hub include:

  • Improved efficiency through automation

  • Enhanced data-driven decision-making

  • Greater customization and flexibility

  • Seamless integration with other HubSpot products

  • Scalability to support business growth

Ops Hub is available in four tiers, each offering a different set of features and capabilities to cater to various business needs and budgets:

  • Free: Basic functionality, including data syncing and integrations

  • Starter: Additional features like custom objects and workflow extensions

  • Professional: Advanced customized automation capabilities

  • Enterprise: Complete solution for large businesses with complex requirements

What is Programmable Automation?

Presently, the Operations Hub Professional edition comes equipped with a feature known as programmable automation. This feature allows you to craft bespoke automation actions using JavaScript designed to meet your unique business operations and requirements.

Furthermore, it is an integral component of the HubSpot CRM platform, eliminating the need for you to develop automation software independently. This also ensures that your data is properly exposed to external third-party servers.

Programmable Automation: The Heart of Operations Hub

Programmable automation allows businesses to create customized workflows and processes by integrating custom objects, workflow extensions, and custom-coded actions. This provides greater flexibility and adaptability compared to traditional automation features.

Traditional features typically rely on pre-built templates and integrations, which can limit customization options. On the other hand, programmable automation enables companies to build custom solutions that cater to their unique requirements. Some of the key advantages of customized solutions include:

  • Improved efficiency and productivity

  • Reduced manual tasks and human error

  • Enhanced collaboration between teams

  • Greater flexibility and customization

  • Faster response times to market changes

Getting Started with Programmable Automation

To get started with customized automation, you'll first need to create a HubSpot account and sign up for the Operations Hub Professional edition if needed.

Programmable automation allows you to create custom actions within your workflows and chatbots. This involves the creation of:

  • Custom code workflow actions are designed to remove friction from internal and external processes.
  • Custom code snippets to customize your chat experience.
  • Webhooks that send both POST and GET requests.

Let's take a closer look at each of them.

How to Create Custom Code Workflow Actions

To create a custom code workflow action:

  • Navigate to the  "Automation" dropdown menu in your HubSpot Dashboard and select  "Workflows", as shown in the video below.
  • If you're building your workflow from scratch, you can start by navigating to the top right, selecting "Create workflow", and then selecting "From Scratch."
  • Click "Blank Workflow" then click Next in the upper right. 
  • Set up your Enrollment triggers.
  •  Click the "+" icon. In the "Choose an action" panel, under the  Workflow section, select "Custom Code". 

Custom coding workflow

Choose your Coding Language

By default, custom code actions are set to use Node.js. This allows you to utilize various JavaScript libraries for tasks like making API calls, running SQL queries, formatting text, modelling objects, and more. However, there is also the choice to develop your action using Python. To do this, access the "Language" dropdown menu and select the Python option.

Select coding language

Include Secrets

Custom code actions provide the ability to include secrets, such as private app access tokens. These secrets are encrypted and securely stored in HubSpot, allowing you to easily reference and utilize them within any of your custom code actions throughout your account.

select secrets

To include a new secret, click on "Add secret". Additionally, you can handle or remove any secrets stored in your HubSpot account by selecting "Manage secrets".

Incorporate Properties

Furthermore, you can incorporate properties into your custom code. To do this, click on the dropdown menu labelled "Select value" and choose a property from the options provided. Using data quality automation, you can utilize existing or any properties you have formatted.

Select properties

To include an additional property, click on "Add property". Each property can only be added once and must have a unique Variable ID. You can utilize up to 50 properties with your custom code.

Create your custom code

Use the Code section to create your custom script.

custom code fieldIf you're using Node.js, you have access to the following libraries that can be utilized within the code action. These libraries can be loaded using the standard require() function at the beginning of your code:

  • @hubspot/api-client ^8
  • async ^3.2.0
  • aws-sdk ^2.744.0
  • axios ^1.2.0
  • lodash ^4.17.20
  • mongoose ^6.8.0
  • mysql ^2.18.1
  • redis" ^4.5.1
  • request" ^2.88.2
  • bluebird ^3.7.2
  • random-number-csprng ^1.0.2
  • googleapis ^67.0.0

On the other hand, in you<re using Python, you can load the following libraries with an import statement at the top of your code. The import statement should be formatted as from [libraryname] import [item], such as from redis.client import redis:

  • requests 2.28.2
  • @hubspot/api-client ^7
  • google-api-python-client 2.74.0
  • mysql-connector-python 8.0.32
  • redis 4.4.2
  • nltk 3.8.1

If you're using anything from the standard library, you can use import, such as import os.

For more information and code examples, check HubSpot's developers' documentation.

Select Data Outputs

In the Data Outputs section, click on the dropdown menu labelled "Data type" and choose a specific data type.

data outputsIn the "Name" field, provide a name for the data output. To include multiple outputs, click on "Add output".

After you have finished customizing, click "Save" to save your custom code action and utilize it in your workflow.

How to Create Custom-Coded Bot Snippets

To create a custom-coded bot snippet:

  • Navigate to the  "Conversations" dropdown menu and select "Chatflows", as shown in the video below.
  • To modify a specific bot, hover over it and click "Edit". Alternatively, you can click "Create chatflow" in the top right corner to create a new chatbot.
  •  Click the "+" icon. In the "Create new" panel, under the  Automation  section, select "Run a code snippet". 

programmable automation chatbot

You can check different use cases of custom bot snippets in the HubSpot's Programmable Automation use Case Library.

How to Create Webhooks

A webhook is like an API, used to request or exchange information with a different system. However, the key distinction is that with a webhook, you receive automatic notifications whenever your monitoring system undergoes an update. This enables you to keep your technology stack up to date without constant requests. While APIs play a crucial role in connecting different systems, utilizing webhooks in conjunction with APIs can enhance the efficiency and reliability of the connection.

Webhooks offer the following benefits:

  • Optimized API usage and reduced API calls: there might be a limitation on the number of requests you can make daily through an API. Webhooks enable you to utilize your requests, resulting in fewer API calls.
  • Constant data sync: if you need to keep your systems in sync in nearly real-time, webhooks provide the advantage of receiving immediate notifications as soon as any event occurs.


There are three ways you can go about creating webhooks in HubSpot:

  • Webhook API: accessible for all subscription tiers, from HubSpot Free to HubSpot Enterprise. The Webhook API enables you to develop an application that subscribes to different events within any account where your application is installed.
  • Workflow extensions: accessible for Professional and higher-tier subscriptions. Using this API, you can design custom workflow actions that transmit data from HubSpot to a specified webhook URL.
  • Programmable Automation webhooks in bots and workflows: by having an Operations Hub Professional or Enterprise subscription, you can activate webhooks using a webhook action in your HubSpot bots or workflows. In the case of bots, a significant advantage is the ability to trigger a webhook based on a user's specific input to the bot. As for workflows, the key benefit is the ability to trigger a webhook across all types of workflows (Contact, Company, Deal, Ticket, and Quote) using various enrollment criteria.

Programmable Automation Best Practices

Planning and organization

Develop a clear automation strategy that outlines your objectives, requirements, outlining processes, establishing roles for team members, and desired outcomes. This will help guide your efforts in creating effective and efficient automations.

Ensuring security and privacy

Data security and privacy should be a top priority when using programmable automation. Businesses must follow best practices for securing sensitive information, such as encrypting information, implementing access controls, and regularly monitoring for vulnerabilities.

Monitoring and maintaining automations

Regular monitoring and maintenance are crucial for ensuring the ongoing success of automations. Businesses should track performance metrics, troubleshoot issues, and make necessary adjustments to optimize their automation processes.

Benefits of Programmable Automation for Revenue Operations (RevOps)

Aligning sales, marketing, and customer service processes

Customized automation can help companies streamline revenue operations by automating tasks and workflows across sales, marketing, and customer service departments.

Enhancing data-driven decision-making

With accurate, up-to-date info at their fingertips, businesses can make more informed, data-driven decisions that drive revenue growth and improve efficiency.

Reducing manual tasks and human error

By automating repetitive, manual tasks, programmable automation helps companies save time, reduce human error, and focus on more strategic initiatives.

Facilitating cross-functional collaboration

Customized automation can help break down silos between different departments, enabling better cross-functional collaboration and aligning teams toward shared goals.

Accelerating revenue growth and improving efficiency

Programmable automation ultimately helps businesses accelerate revenue growth and improve overall efficiency by optimizing processes, reducing manual tasks, and enhancing decision-making.

Success Stories: Representative Examples of Programmable Automation

SaaS Company

A software company may use customized automation to streamline their lead generation process, automating data collection and scoring, significantly increasing qualified leads and improving sales team efficiency.

Digital Marketing Agency

An Agency can leverage programmable automation to create tailored marketing campaigns for their clients, automating content creation, distribution, and performance tracking, increasing client satisfaction and revenue growth.

Retail business

A retail business may implement customized automation to optimize inventory management, automating stock level monitoring, and reordering processes, leading to reduced stockouts and improved overall efficiency.

Pro Tip

Check out the library for programmable automation use cases in HubSpot's Operations Hub. It is a source of knowledge, examples and inspiration.


Programmable automation offers numerous benefits for businesses, including increased flexibility, improved efficiency, enhanced data-driven decision-making, reduced manual tasks and human error, accelerated revenue growth, and the ability to adapt to changing business needs.

As technology advances, we can expect Ops Hub to evolve and introduce new features and capabilities that will further empower companies to automate and scale their operations.

Businesses that embrace programmable automation and invest in the right tools and strategies will be better positioned for long-term success in today's competitive landscape.

Frequently Asked Questions

Is HubSpot's Operations Hub suitable for all businesses?

Yes, it is designed to accommodate businesses of all sizes and industries. The different tiers allow companies to choose the plan that best suits their needs and budget.

How does HubSpot ensure data security and privacy?

HubSpot employs robust security measures to protect user data, including encryption, access controls, and regular security audits. Additionally, the platform is designed to support compliance with data protection regulations such as GDPR and CCPA.

Can non-technical users set up Programmable Automation in HubSpot?

While some aspects of customized automation may require technical expertise, HubSpot's user-friendly interface and extensive resources make it accessible to non-technical users as well.

What programming languages are supported in custom-coded actions?

HubSpot supports various programming languages for custom-coded actions, including JavaScript, Python, and HubL (HubSpot's own templating language).

Can I use Operations Hub alongside other HubSpot products?

Yes, the Ops platform is designed to work seamlessly with other HubSpot products, such as CRM, Marketing Hub, Sales Hub, and Service Hub. This allows businesses to create unified, end-to-end workflows across various functions and departments.

What resources are available for learning more about programmable automation?

HubSpot offers a variety of resources, such as documentation, tutorials, HubSpot Academy, and community forums, to help users learn more about customized automation and how to get the most out of Ops Hub.

Miguel Lage


Related posts

Search HubSpot Operations Hub: Driving Revenue Growth
Mastering the HubSpot Data Quality Command Center: An In-depth Guide Search