Overview
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.
Before you start
You'll need:
The Opensense HubSpot integration connected, with the sgentags contact property created during setup
HubSpot permissions to create and publish workflows
A banner campaign in the Opensense portal, or a plan for the tag value you'll assign — see configuring campaigns and tags
A test contact record you can send to and check against
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.
Part 1: Build the HubSpot workflow
Step 1: Start a new workflow
In HubSpot, go to Automations > Workflows, then click Create workflow.

Step 2: Choose From scratch
In the Create workflow dropdown, click From scratch.

Step 3: Choose a trigger type
On the Triggers panel, click Met filter criteria. This enrolls records whenever they match the conditions you set in the next steps.

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 live on another object.

Step 5: Set your enrollment criteria
Click Add criteria. The criteria panel opens with a Viewing dropdown at the top, set to Contacts (primary) by default. This dropdown is what lets you target on records other than the contact.
Use the Viewing dropdown 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 dropdown

Once you've chosen an object, pick a filter type using the tabs below the dropdown:
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

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

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.
Click Next.

Expected result
The trigger card at the top of the canvas summarizes your conditions instead of showing "No enrollment conditions".
Step 7: Set re-enrollment, then save
On the Settings step, decide whether contacts can re-enroll after completing the workflow, then click Save and continue.

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 pick up a different banner.
Step 8: Add the Edit record action
Click the + below the trigger card to add an action. In the Choose an action panel, search for edit record, then select Edit record under CRM.

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


Tip
Use sgenads instead of sgentags to set a static banner rather than a tag-matched campaign.
Step 10: Set the tag value
Set Change type to Replace, then enter your tag in the Choose a value field. In this example the value is accounting_industry. Click Save.

Change type replaces the old checkbox. Earlier versions of the workflow builder used a Clear existing property value checkbox. The current builder uses the Change type dropdown instead. Replace overwrites whatever tag the contact already has.
Tag value formats
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 relative 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
The canvas now shows your trigger and a single action reading Set sgentags to accounting_industry. Name the workflow, then click Review and turn on.

Expected result: Matching contacts enroll and their sgentags property is populated with your tag value.
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 carries a tag that matches that value.
In the Opensense portal, go to Marketing > Campaigns, find your campaign, and confirm its tag matches the sgentags value exactly. In this example, the campaign accounting_vertical_webinar_2026 carries the tag accounting_industry, matching the value the workflow writes.

Tags must match exactly. Use lowercase letters, numbers, and underscores only. Tags are case-sensitive, and spaces, hyphens, and other characters will not match. accounting_industry and Accounting Industry are two different tags, and the second one will never resolve to a banner.
Part 3: Verify the banner resolves for a recipient
Once the workflow has run and the campaign is set up, confirm the correct banner is selected for a specific contact before you roll the workflow out more widely.
In the Opensense portal, go to Manage > Integrations
Click your HubSpot integration
Open the Diagnostics tab
In the Diagnostics field, enter the email address of the contact record you're testing with
Click Refresh

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.

How to verify it worked: Rendered HTML shows the campaign name you expected for that recipient. If it shows a different campaign, or no ad token, work through the troubleshooting steps below.
Troubleshooting
Rendered HTML shows no ad token for the test recipient.
Check that the contact actually enrolled in the workflow and that sgentags is populated on their contact record in HubSpot. If the property is empty, the contact didn't meet your enrollment criteria — revisit Step 5, particularly the Viewing dropdown, and confirm you filtered on the object you intended.
sgentags is populated, 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 the campaign status is Active.
The wrong banner shows for a contact.
A contact may carry 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. Set Change type to Replace rather than Add to current value if a workflow should overwrite previous tags.
For more help, contact help@opensense.com.


