Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

How to Automatically Merge Records in HubSpot Workflows (Using Custome Workflow Business v2)

This article explains the purpose, use cases, and operational steps for the "Record Merge 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 merge two existing records in HubSpot (e.g., duplicate companies) using a workflow.

While HubSpot has a standard manual merge feature, this action allows you to automate the consolidation of records as part of a specific process.

How This Action Works

This action is executed by specifying two separate Record IDs:

  1. Record ID (Source): The record to be merged from. All data and associated objects from this record will be moved to the primary record, and this source record itself will be deleted.
  2. Record ID (Primary): The record to be merged into. This record will absorb the source record's information and will remain in the database.

Use Cases

This feature is useful for automating data cleansing or organizational restructuring processes.

  • Automated Deduplication: Automatically merge duplicate records (e.g., test1 and test2) that were created via API integrations or manual entry, designating one as the primary.
  • Manual Trigger Merging: Identify two duplicate Record IDs in advance, and then run this workflow to complete the merge at a time of your choosing (the case shown in the video).
  • Consolidating Subsidiaries: Automatically merge a subsidiary company record into a parent company record after an acquisition or organizational change is finalized.

Setup and Execution Steps (As seen in the video)

The video shows the process of merging a company named test2 into a company named test1, resulting in the deletion of test2.

Step 1: Check Data Before Execution

  • Verify that the two company records to be merged, test1 (Primary/to be kept) and test2 (Source/to be deleted), exist on the company index page.

Step 2: Configure the Workflow and Trigger

  • Open the company-based workflow editor.
  • The trigger (enrollment criteria) is set to "Manually triggered only." This setting means the workflow will only run when a user selects a record from the index page and manually enrolls it.

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 "Record Merge Action."

Step 4: Specify the IDs to Merge

  • The configuration screen for "Record Merge Action" opens.
  • Record ID (Source): Enter the ID of the record that will be merged and deleted (in this example, the Record ID for test2).
  • Record ID (Primary): Enter the ID of the record that will be merged into and kept (in this example, the Record ID for test1).
  • Click "Save" to apply the settings. (In the video, an action with pre-configured IDs is already in place).

Step 5: Activate and Run the Workflow

  • Activate the workflow ("Workflow is On").
  • Return to the company index page and check the box next to test1 (the primary company).
  • (Operation not fully shown in video) Manually enroll the test1 record in this "test" workflow using the "Enroll in workflow" button.

Step 6: Verify the Final Result

  • When the workflow executes, the test2 (Source) record is merged into the test1 (Primary) record.
  • The company list automatically refreshes, and it is confirmed that the test2 record has disappeared from the list, leaving only the test1 record.

‍

Source Code

HTML
CSS
Javascript

FAQ

Is this "Record Merge Action" a standard HubSpot feature?

No, it is not a standard feature. While HubSpot does have a standard manual function for merging records, the automated merging within a workflow explained in this article is a custom action that becomes available by installing a third-party app called "Custome Workflow Business v2."

Between the "Record ID (Source)" and the "Record ID (Primary)," which record gets deleted?

The record specified as the "Record ID (Source)" is the one that gets deleted. This action migrates all information and associated objects from the "Source" record to the "Primary" record, and then removes the "Source" record from the database. In the article's example, test2 is the "Source" (deleted) and test1 is the "Primary" (kept).

Is it possible to merge the record that enrolls in the workflow (as the "Source") into a fixed "Primary" record?

Yes, that is possible (though it's a different setup from the video). The video shows both IDs being entered manually (as fixed values). However, assuming the action's input fields support property tokens, you could configure it as follows: Set the workflow trigger for the record you want to merge (and delete) as the "Source." In the action settings for "Record ID (Source)," use a property token to specify the ID of the record currently enrolled in the workflow. In the "Record ID (Primary)" field, manually enter the fixed ID of the record you want to keep.

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