> For the complete documentation index, see [llms.txt](https://docs.dapta.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dapta.ai/flow-studio/nodes/get-a-record-from-hubspot.md).

# Get a Record from Hubspot

Use the Search Record node in Flow Studio to query HubSpot Companies, Contacts or Deals by ID, email or phone, and pick which properties to return.

A very important part of working with Data via API is to be able to search for an object inside your CRM remotely. At Dapta we have set a native connection with HubSpot that allows you to search different types of Data inside of HubSpot via its API. HubSpot’s API is very versatile so it allows you to search via multiple different parameters. By default, HubSpot has 3 main entities that can be searched. These are “Companies”, “Contacts” and “Deals”.

\
In Dapta, you can search each for each of the entities in HubSpot via the API. To do this, open your Flow Studio page and open a new Flow. Then go to the templates and select the “Search Record” node

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-d91e501b4fcfb13af95f1ea1db429d7f7f307885%2Fget-a-record-from-hubspot-01-search-record-template.png?alt=media" alt="Actions panel filtered by"><figcaption><p>Search Record in the Actions panel</p></figcaption></figure>

When you add this node you will have the option to select a Credential, which is your way of connecting to HubSpot via the API. If you need help setting up the credential, see [HubSpot Private App Setup](/integrations/hubspot-private-app-setup.md).

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-515c6c96efd6218ee31e2507c524d66da0728a7e%2Fget-a-record-from-hubspot-02-credential-selector.png?alt=media" alt="Search Record node configuration with the Credentials dropdown open"><figcaption><p>The Credentials selector on the node</p></figcaption></figure>

#### Use a variable instead of a fixed credential

Next to **Credentials** there's an **Option** / **Variable** switch:

* **Option** shows the list of your saved credentials. The node always uses the one you pick.
* **Variable** lets you type an expression instead, and the token is read from it each time the flow runs. For example, type `{{daptaVault.hubspot_access_token}}` to use a secret saved in your **Vault**, or use a value the flow receives when it's called, so one flow can use a different HubSpot token on each call.

Switching back to **Option** brings the credential list back. The node uses whichever mode is selected when you save the flow.

On this node you can select which type of entity you are going to query

Once you have selected the entity or object type, it’s really important to select which properties to extract. This is because each record in HubSpot has dozens of properties, and not all of them are relevant for querying. So you can just select which ones are relevant for you

After you have selected the properties to be shared, you can select which will be the filter to extract the information. The most recommended here would be either the HubSpot ID, email or the phone number (for contacts mainly).

And now, when you run the flow connected to the new node, you will receive the information related to the filter you set up

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dapta.ai/flow-studio/nodes/get-a-record-from-hubspot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
