# Setting up segmentation for Hubspot

[Segment sets](https://docs.messagebird.com/taxi/Dynamic%20content,%20segmentation%20and%20personalisation/Segmentation/creating-and-managing-segment-sets) and [single segments](https://docs.messagebird.com/taxi/Dynamic%20content,%20segmentation%20and%20personalisation/Segmentation/creating-and-managing-single-segments) are defined in the segmentation section of your Taxi account. These allow you to set up rules to control which content is sent to the groups of people within this segmentation. They are then applied to any of the modules in your Email Design System to give you complete control of the specific content that’s sent to your customers.

Hubspot segmentation is mapped by the connector to Hubspot conditional code snippets, and this code is run when the email is sent. This ensures each recipient gets the content selected for them. Hubspot uses Hubspot Markup Language for their conditional logic. They use a lot of jinjava but not all of it is supported and there is some Hubspot specific code you can use.

Have a look at their documentation to find out more: <https://developers.hubspot.com/docs/cms/hubl>

![](https://2516523503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMq0EQG9Ff46ZMsrIBcVn%2Fuploads%2Fgit-blob-c3e4c557281d2c0e9c9e70f442c23d5e8c197135%2FHubspot%2Bsegmentation%2B1.png?alt=media)

Once segments are defined it is possible to use them in the Taxi editor and to preview content for each segment.

\
Finally, to be able to export code through the connector, the HubL for segments must be added. This code is set per connector. This means you can use different HubL between environments, and thus you can work with different data structures and formats if needed.

\
Code for segments is entered through the segmentation settings.<br>

![](https://2516523503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMq0EQG9Ff46ZMsrIBcVn%2Fuploads%2Fgit-blob-656dd8e3630bd82c31dcbf411996ca1e188b227b%2Fhubspot%2Bsegmentation3.png?alt=media)![](https://2516523503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMq0EQG9Ff46ZMsrIBcVn%2Fuploads%2Fgit-blob-0ac23296cde22e4e2c5081bc0ce90cfe297069a8%2Fhubspot%2Bsegmentation4.png?alt=media)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/taxi/connectors/hubspot-connector/setting-up-segmentation-for-hubspot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
