Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

How to Count Total Marketing Contacts in HubSpot Workflows (Using Custome Workflow Business)

This article explains the purpose, use cases, and operational steps for the "Marketing Contact Count Action" feature, part of the third-party HubSpot app "Custome Workflow Business" (v2).

Demo Video

Over view
Code

Detail

Purpose

The primary purpose of this workflow action is to automatically count the total number of contacts currently set as "Marketing Contacts" across your entire HubSpot account and return that number.

The resulting number (the count) is returned as an "action output" in the workflow. This allows you to save the count to a property or use it as a condition for a branch in subsequent actions.

Use Cases

This feature is extremely useful for managing your HubSpot marketing contact tier (contract limit) and monitoring costs.

  • Monitoring Marketing Contact Limits: Periodically fetch the total number of marketing contacts and send an internal notification (alert) if the number approaches your contract limit.
  • Cost Management Reporting: Save the count to a custom property and visualize it on a HubSpot dashboard to keep track of licensing costs.
  • Triggering Cleansing Processes: If the number of marketing contacts exceeds a specific threshold, automatically create a task prompting a user to review and set non-essential contacts to "non-marketing."

Setup and Execution Steps (As seen in the video)

The video shows how the workflow correctly retrieves the number "4" in an account that currently has four marketing contacts.

Step 1: Check Data Before Execution

  • Open the HubSpot contacts index page.
  • Apply a filter for "Marketing contact status is Marketing contact."
  • In the video, it is confirmed that 4 contacts (test, test test, Brian Halligan, Maria Johnson) match this criteria.

Step 2: Check Workflow and Trigger

  • Navigate to the workflow editor.
  • For demonstration purposes, the trigger (enrollment criteria) is set to activate when the "Event Date" property value is changed.

Step 3: Add the Custom Action

  • Click the "+" icon in the workflow to add a new action.
  • From the action selection panel, choose "Custome Workflow Business v2" from the "Integrated apps" section.
  • From the list of custom actions that appears, select "Marketing Contact Count Action."

Step 4: Configure the Action

  • The configuration screen for "Marketing Contact Count Action" opens.
  • Because this action counts the total number for the entire account, there are no special configuration fields to fill out.
  • Review the description (Returns the number of contacts set as marketing contacts in the account) and click "Save."

Step 5: Activate the Workflow and Confirm Execution

  • The "1. Marketing Contact Count Action" is added to the workflow.
  • Activate the workflow ("Workflow is On") and perform the action that meets the trigger criteria.
  • Navigate to the "Enrollment history" tab and click on the execution history for the enrolled contact (Brian Halligan).

Step 6: Verify the Final Result

  • The execution "Event details" will appear on the right side.
  • The action is shown as "Successful."
  • In the "Action outputs" section, the LABEL is count_num and the VALUE is 4.
  • This result of "4" matches the total number of marketing contacts that was confirmed in Step 1.

By using the "Marketing Contact Count Action," you can easily retrieve the current number of marketing contacts within a workflow and leverage it in your automation processes.

‍

Source Code

HTML
CSS
Javascript

FAQ

Is this "Marketing Contact Count Action" a standard HubSpot feature?

No, it is not a standard feature. The feature explained in this article is a custom action that becomes available by installing a third-party app called "Custome Workflow Business v2" in HubSpot.

Can I count only the "Marketing Contacts" that are in a specific list or meet certain criteria?

No, you cannot. As explained in this article (Step 4), this action is a dedicated function for counting the total number of "Marketing Contacts" that exist in the entire HubSpot account. There are no settings to filter this count by a specific list or criteria at the time of execution.

How can I use the counted number (the total)?

The count result is returned as a number in the "Action outputs" of the workflow's history (in the video, the value 4 is returned with the label count_num). This output value can be used in subsequent actions. For example, you can use the "Set property value" action to save it to a custom property (to be visualized on a dashboard) or use it in an "If/then branch" action for conditions like "If [the retrieved number] is greater than [your contract limit]."

Search

Search more

Related Template

Need Customization?

We can customize this sample to match your specific business requirements.

Book Free Consultation

Got a quick dev request?

Put it on Trello!Need a fix for HubSpot, CMS, or GAS? Post it on Trello.

Development Requests Here

GAS Library: Automated Blog Post NG Word Checking with AI (Gemini/OpenAI)

HubSpot Custom Workflow Guide: How to Find a Contact's "Most Recent Campaign"

HubSpot Custom Workflow Guide: How to "Search" for Products and Get Price/SKU Data

GAS Library Guide: How to Automatically Check for Broken Links in Google Sheets

HubSpot Custom Workflow Guide: How to Auto-Search and Recommend Marketing Events

Company Info
Name : SweetsVillage .Inc
CEO :
‍
Tomoo Motoyama

HomeTemplateCustomWorkflow
Terms & ConditionsPrivacy PolicyContact us

Copyright ©SweetsVillage .Inc

Back To Top Image