Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

HubSpot Custom Workflow Guide: How to "Search" for Deals and Auto-Associate Contacts

When managing contact workflows in HubSpot, you may need to automatically associate a contact (Contact A) with an existing deal (Deal X) after they fill out a form, perhaps by providing a specific deal name or project ID.

This process of dynamically searching for a separate object (in this case, a "Deal") and associating it with the enrolled contact is a perfect job for a 3rd-party custom workflow action.

This article explains the purpose, use cases, and setup steps for the "Deal Search Action" shown in your video.

‍

Demo Video

Over view
Code

Detail

Purpose of the Action

The primary purpose of this action, when used in a contact workflow, is to search for a "Deal" record that matches specific criteria (e.g., Deal Name, custom ID) and retrieve its "Record ID" (Deal ID).

The ultimate goal is to use this retrieved Deal ID to automatically associate the enrolled contact (Contact A) with the found deal (Deal X).

Common Use Cases

This action is useful for automatically linking contacts to ongoing sales opportunities or projects.

  • Link Inquiries to Existing DealsA contact (Contact A) submits a "Request for Information" form and specifies an existing "Deal Name" (e.g., "test2"). The workflow searches for the deal named "test2" and automatically associates Contact A with it.
  • Association via Custom IDIf a contact (Contact A) has a "Customer Code" and a deal (Deal X) has a matching "Customer Code," the workflow can search for the deal using this key and associate them.
  • Consolidate Leads to a Specific Open DealWhen contacts interested in "Product A" enroll in a workflow, this action can search for a specific open deal (e.g., "Product A - 2025 Q4 Pipeline") and associate all new leads to it for tracking.

Step-by-Step Guide from the Video Demo

The video demonstrates the setup and execution of the "Deal Search Action."

Step 1: Add the Action (0:04 - 0:09)In the workflow editor, click the "+" icon. The left sidebar opens, and the video shows the user selecting the "Custom Workflow Business V2" app.

Step 2: Select "Deal Search Action" (0:10 - 0:12)From the app's list of actions, click "Deal Search Action" to add it to the workflow.

Step 3: Configure Search Criteria (0:13 - 0:39)In the action's setup panel on the left, you define which deal you are looking for.

  • First Condition:Set the Condition - Property Name (e.g., Deal Name), the Condition - Search Operator (e.g., Equal to), and the Condition - Value (e.g., "test2").(In a real-world scenario, the Value would typically be a personalization token from the enrolled contact, such as a custom property, rather than a static value.)
  • Second Condition (Optional):The action allows a second condition (e.g., Amount) and an Operator between Conditions (AND/OR).
  • Exclusion:The Deal ID field can be used to exclude a specific deal from the search results.

Step 4: Save Configuration (0:40 - 0:42)Click the "Save" button to complete the action setup.

Step 5: Run Workflow & Check History (0:43 - 0:52)The workflow is turned on and run. In the "History" tab, the "Deal Search Action" shows as "Action succeeded."The log details (right panel) show the "OUTPUTS," where search_results has successfully returned the found Deal's Record ID (e.g., "18091140711").

Step 6: Verify the Result (0:53 - 0:56)(As a supplement to the demo) The user then switches to the "Deals" list in HubSpot and confirms that the deal with ID "18091140711" is indeed the one named "test2."

[IMPORTANT] How to Use the Deal ID to Associate the Contact

This action only finds the Deal ID. To associate the contact with this deal, you must combine it with another action provided by this same 3rd-party app.

  1. Add an If/then BranchImmediately after the "Deal Search Action," add a standard HubSpot "If/then branch" action.
  2. Set Branch CriteriaSet the branch condition to check if the output from the "Deal Search Action" (search_results) "is known".
  3. Add the "Association" ActionIn the "Yes" (found) branch, click "+" and select the "Associate Object by ID" action (or similarly named action) provided by this 3rd-party app.
  4. Execute the AssociationConfigure this association action as follows:
    • From ID: Use the [Contact Record ID] token (for the contact enrolled in the workflow).
    • To ID: Use the [search_results] token (the Deal ID you just found).

This completes the full automation, enabling a contact to be automatically associated with a specific deal based on your search criteria.

‍

Source Code

HTML
CSS
Javascript

FAQ

Is this "Deal Search Action" a standard HubSpot feature?

No, it is not. This is a custom action that becomes available by installing a third-party app called "Custom Workflow Business V2." A standard HubSpot workflow branch primarily checks conditions on the contact currently enrolled in the workflow (Contact A) (e.g., "What is Contact A's industry?"). The key difference with this action is that it can search the entire database for a different deal (e.g., "the deal matching the name Contact A submitted in a form").

Does this one action automatically associate the found deal (Deal X) with the contact who is enrolled in the workflow (Contact A)?

No, it does not. As emphasized in the article's "【Important】How to Associate the Contact with the Retrieved Deal ID" section, this action's only job is to search for and find the Record ID of the matching deal. To actually associate the contact with the deal, you must add these steps after this action: An "If/then branch" to check if a deal was found. A separate "Association Action (Associate Object by ID)" (likely provided by the same app) where you specify Contact A's ID and the search_results (the Deal ID) retrieved from this action.

The video shows a fixed text value ("test2") as the search criteria. Can I perform a dynamic search, like searching for a deal based on "the deal name the contact entered in a form"?

Yes, you can. That is the most common use case for this action, as explained in the "Main Use Cases" section. Instead of typing a fixed value (test2) into the search criteria (Condition - Value) in Step 3, you would set a property token from the contact enrolled in the workflow (e.g., [Deal Name submitted in form]). This allows you to perform a dynamic search, such as "find Deal X that Contact A specified."

Search

Search more

Related Template

Need Customization?

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

Book Free Consultation

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

HubSpot Custom Workflow Guide: How to Auto-Recommend Files with Generative AI

HubSpot Custom Workflow Guide: How to "Search" for Marketing Campaigns and Use Their Data

HubSpot Custom Workflow Guide: How to "Search" for Tickets and Auto-Associate Contacts

HubSpot Custom Workflow Guide: How to "Search" for Deals and Auto-Associate Contacts

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

HomeTemplateCustomWorkflow
Terms & ConditionsPrivacy PolicyContact us

Copyright ©SweetsVillage .Inc

Back To Top Image