Skip to content

Assigning Opensense tags with a HubSpot workflow

Learn how to build a HubSpot workflow that writes an Opensense tag to a contact record, so the right banner shows in that contact’s emails. This guide covers HubSpot’s current workflow builder, including how to target contacts using properties on the contact record, on associated records such as Company, and on custom objects.

This article uses one worked example throughout: showing an accounting-industry webinar banner to every contact who works at a company in the Accounting industry. The tag value is accounting_industry.

In HubSpot, go to Automations > Workflows, then select Create workflow.

HubSpot Automation page on the Workflows tab, with the Create workflow button in the upper right

In the Create workflow menu, select From scratch.

Create workflow menu open, showing From scratch, From template, With AI, and With new builder

On the Triggers panel, select Met filter criteria. This enrolls records whenever they match the conditions you set in the next steps.

Triggers panel with Trigger manually, Met filter criteria, and On a schedule, with Met filter criteria selected

Step 4: Choose the record type that can enroll

Section titled “Step 4: Choose the record type that can enroll”

Select Contact. Opensense tags are written to contact records, so contacts must be the enrolling record type, even when your targeting criteria are on another object.

The Choose a type of record that can enroll list, showing Contact, Company, Deal, Ticket, and other record types

Select Add criteria. The criteria panel opens with a Viewing menu at the top, set to Contacts (primary) by default. This menu lets you target on records other than the contact.

Use the Viewing menu to choose where your criteria come from:

Contacts (primary)
Properties on the enrolled contact record itself, such as Job Title or Lifecycle Stage.
An associated object
Properties on a record the contact is associated with, such as Company or Deal.
A custom object
Any custom object in your portal, listed under Custom Objects at the bottom of the menu.

The Viewing menu open on the criteria panel, showing standard objects and a Custom Objects section

When you’ve chosen an object, pick a filter type, using the tabs under the menu:

Properties
Filter on a property value, such as Industry or Country.
Events
Filter on an activity or event.
Memberships
Filter on list, workflow, or import membership.

The criteria panel on the Properties tab, with a search field for Contact properties and a grouped property list

To target a list instead of a property, open the Memberships tab, choose Segment (List) membership, and then select your list.

The criteria panel on the Memberships tab, showing Segment (List) membership, Workflow enrollment, and Import membership

Step 6: Review the criteria group and continue

Section titled “Step 6: Review the criteria group and continue”

Your finished criteria appear as a group on the right. In this example, the group reads: Contact is associated to Any Company where any of the associated companies match: Industry is any of Accounting.

Select Next. The trigger card at the top of the canvas now summarizes your conditions, instead of showing “No enrollment conditions”.

Enrollment criteria showing Contact associated to Any Company where Industry is any of Accounting, with the Next button

On the Settings step, decide whether contacts can re-enroll after they complete the workflow, then select Save and continue.

The Triggers Settings step, showing the Re-enroll toggle and the Save and continue button

Leave re-enrollment off if a contact should be tagged once. Turn it on if contacts may qualify again later: for example, if they move to a company in a different industry, and should get a different banner.

Select the + under the trigger card to add an action. In the Choose an action panel, search for edit record, then select Edit record under CRM.

The Choose an action panel, with edit record searched and the CRM Edit record action highlighted

Leave Record type set to Contact (Current object). Open the Property to edit menu, search for sgentags, and select it. The property is labeled Opensense Ads (Campaign Tag).

Set Change type to Replace, then enter your tag in the Choose a value field. In this example, the value is accounting_industry. Select Save.

The Edit record panel, with sgentags selected, Change type set to Replace, and accounting_industry entered as the value

You can assign more than one tag, by separating values with commas. The number of times a tag appears controls how often that banner displays, compared to the others.

  • sales: a single tag.
  • sales, marketing, sales: controls display frequency.
  • sales, marketing, sales, inbound24: rotates banners.

Step 11: Review the workflow and turn it on

Section titled “Step 11: Review the workflow and turn it on”

The canvas now shows your trigger and a single action, reading Set sgentags to accounting_industry. Name the workflow, then select Review and turn on.

The completed workflow canvas, showing the enrollment trigger and an Edit record action that sets sgentags

Matching contacts enroll, and their sgentags property is filled in with your tag value.

Part 2: Match the tag to your Opensense campaign

Section titled “Part 2: Match the tag to your Opensense campaign”

The workflow writes a value to HubSpot, but nothing displays until a campaign in the Opensense portal has a tag that matches that value.

In the Opensense portal, go to Marketing > Campaigns, find your campaign, and confirm that its tag matches the sgentags value exactly. In this example, the campaign accounting_vertical_webinar_2026 has the tag accounting_industry, which matches the value the workflow writes.

The Opensense Campaigns page, with a campaign showing the tag accounting_industry under the campaign name

Part 3: Verify the banner resolves for a recipient

Section titled “Part 3: Verify the banner resolves for a recipient”

When the workflow has run and the campaign is set up, confirm that the correct banner is selected for a specific contact, before you roll out the workflow more widely.

  1. In the Opensense portal, go to Manage > Integrations.
  2. Select your HubSpot integration.
  3. Open the Diagnostics tab.
  4. In the Diagnostics field, enter the email address of the contact record you’re testing with.
  5. Select Refresh.

The HubSpot integration's Diagnostics tab, with an email address entered and the Refresh button

Check the Rendered HTML section. It shows the ad token selected for that recipient: in this example, [[ad:accounting_vertical_webinar_2026]], the campaign matched by the accounting_industry tag.

The Diagnostics tab, with the Rendered HTML section showing the resolved ad token for the tested recipient

If Rendered HTML shows the campaign name you expected for that recipient, it worked. If it shows a different campaign, or no ad token, work through the troubleshooting below.

Rendered HTML shows no ad token for the test recipient

Check that the contact actually enrolled in the workflow, and that sgentags is filled in on their contact record in HubSpot. If the property is empty, the contact didn't meet your enrollment criteria. Go back to Step 5, especially the Viewing menu, and confirm that you filtered on the object you intended.

sgentags is filled in, but no banner resolves

Compare the tag on the campaign with the value in sgentags, character by character. Capital letters, spaces, and hyphens are the most common causes. Confirm that the campaign status is Active.

The wrong banner shows for a contact

A contact may have tags from more than one workflow. Check the full value of sgentags on the contact record. If it holds several comma-separated tags, banners rotate among the matching campaigns. If a workflow should overwrite previous tags, set Change type to Replace, rather than Add to current value.

For further help, contact Opensense Support at help@opensense.com.

Screenshot preview

Screenshot