Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

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

When managing HubSpot contact workflows, you might need to retrieve detailed information about a marketing campaign based on a contact's input, such as finding a campaign's details using an "Event Name" they submitted in a form.

This process—dynamically searching for another object (in this case, a "Marketing Campaign") and using its data in subsequent actions—is made possible by 3rd-party custom workflow actions.

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

‍

Demo Video

Over view
Code

Detail

Purpose of the Action

The primary purpose of this action is to search for a "Marketing Campaign" that matches specific criteria (e.g., Campaign Name) during a contact workflow. It then outputs multiple pieces of information about that campaign, such as its "Campaign ID," "Campaign Name," and "Campaign Notes."

The ultimate goal is not just association, but to use this retrieved data to update the contact's properties or to add detailed context to automated tasks for your sales or marketing teams.

Common Use Cases

This action is valuable for connecting a contact's activities with your marketing initiative data.

  • Link Form Submissions to Campaign DataA contact (Contact A) submits a form and selects an "Event Name" (e.g., "test1"). The workflow searches for the campaign with that name, finds its "Campaign ID," and copies that ID to a custom property on Contact A's record (e.g., "Attended Campaign ID").
  • Automate Enriched Sales TasksWhen a contact meets certain criteria (e.g., "Demo Requested"), the workflow searches for a related campaign (e.g., "2025 Fall Sale"). It then retrieves the "Campaign Name" and "Campaign Notes" (which might contain key talking points for sales) and creates a task for the sales rep, automatically including this context in the task description.
  • Branching Logic Based on Campaign DetailsUse an If/then branch after the search action to change the workflow path based on the retrieved data. For example, if the output campaignNotes contains the keyword "VIP," add the contact to a "VIP Follow-up" list.

Step-by-Step Guide from the Video Demo

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

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

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

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

  • Query:Enter the name of the campaign you want to find (e.g., "test1"). This field can accept a static value (like in the demo) or a personalization token from the enrolled contact (e.g., a "Campaign Name" property from a form submission).
  • Campaign ID:(Optional) Use this field if you need to search directly by a specific, known Campaign ID.

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

Step 5: Run Workflow & Check History (0:24 - 0:32)The workflow is turned on and run. In the "History" tab, the "Campaign Search Action" shows as "Action succeeded."The log details (right panel) show the "OUTPUTS." You can see that campaignName ("test1"), campaignId, and campaignNotes have all been successfully retrieved.

Step 6: Verify the Result (0:33 - 0:36)(As a supplement to the demo) The user then switches to the "Campaigns" list in HubSpot and confirms that the campaign named "test1" with the matching ID exists.

How to Use the Retrieved Information (Examples)

This action only retrieves the data. To use it, you must add subsequent actions.

Example 1: Update a Contact Property

  1. After the "Campaign Search Action," add a standard HubSpot "Set property value" action.
  2. Choose a custom contact property to update (e.g., "Related Campaign ID").
  3. For the value, select the [campaignId] token from the "Campaign Search Action" data source.

Example 2: Add Context to a Task

  1. Add a standard HubSpot "Create task" action.
  2. In the task "Title" or "Notes" field, insert the [campaignName] and [campaignNotes] tokens from the "Campaign Search Action." This creates a much more informative task for your team.

‍

Source Code

HTML
CSS
Javascript

FAQ

Is this "Campaign 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."

Does this one action automatically "associate" the contact with the campaign it finds?

No, it does not automatically associate them. As explained in this article, this action's role is to search for and output the campaign's information (like its "ID," "Name," or "Notes"). For example, to save the retrieved ID (campaignId) to a contact's property (e.g., "Attended Campaign ID"), you must add HubSpot's standard "Set property value" action after this custom action.

The video shows a fixed text value ("test1") as the search query. Can I perform a dynamic search, like searching for a campaign based on "the event 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 entering a fixed value in the search criteria (Query) in Step 3, you would set a property token from the contact enrolled in the workflow (e.g., [Event Name from form]). This allows you to perform a dynamic search, such as "find the campaign with the event name 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