> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/hubspot/getcontacts.md).

# GetContacts

Retrieves contacts from HubSpot.

Task version: 1.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.HubSpot/tree/main/Frends.HubSpot.GetContacts>

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name                    | Description                                                                                                                                                                                                           |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FilterQuery : `String`  | <p>Optional. Filter query to narrow search results in a simple expression format: <code>property operator 'value'</code></p><p><br>Default: <code>-</code><br>Example: <code>email eq '<test@example.com>'</code></p> |
| Properties : `String[]` | <p>Optional. Specific contact properties to retrieve.</p><p><br>Default: <code>-</code><br>Example: <code>new string\[] { "email", "firstname", "lastname", "company" }</code></p>                                    |
| Limit : `Int32`         | <p>Optional. Maximum number of contacts to return.</p><p><br>Default: <code>100</code><br>Example: <code>50</code></p>                                                                                                |
| After : `String`        | <p>Optional. Paging cursor for fetching the next page.</p><p><br>Default: <code>-</code><br>Example: <code>"MjAyMy0wMS0wMVQwMDowMDowMC4wMDAtMTI6MDA"</code></p>                                                       |
| {% endtab %}            |                                                                                                                                                                                                                       |

{% tab title="Connection" %}

| Name                | Description                                                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🗝ApiKey : `String` | <p>HubSpot Private App access token.</p><p><br>Default: <code>-</code><br>Example: <code>xxx-xxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</code></p> |
| BaseUrl : `String`  | <p>Base URL for the API.</p><p><br>Default: <code>-</code><br>Example: <code><https://api.hubapi.com>.</code></p>                                |
| {% endtab %}        |                                                                                                                                                  |

{% tab title="Options" %}

| Name                             | Description                                                                                                                                 |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| IncludeArchived : `Boolean`      | <p>Optional. Whether to include archived records. Default is false.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p> |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure. True by default.</p><p><br>Default: <code>True</code><br>Example: <code>false</code></p>           |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Failed to retrieve contacts.</code></p>      |
| {% endtab %}                     |                                                                                                                                             |
| {% endtabs %}                    |                                                                                                                                             |

## Task Result

| Name                               | Description                                                                                                                                         |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`                | <p>Indicates if the operation completed successfully.<br>Example: <code>true</code></p>                                                             |
| Contacts : `JToken`                | <p>Array of contact objects.<br>Example: <code>\[{ "id": "1", "properties": { "email": "<test@example.com>", "firstname": "John" } }]</code></p>    |
| HasMore : `Boolean`                | <p>Whether there are more results to retrieve.<br>Example: <code>true</code></p>                                                                    |
| NextPageCursor : `String`          | <p>Cursor for next page of results, if any.<br>Example: <code>"MjAyMy0wMS0wMVQwMDowMDowMC4wMDAtMTI6MDA"</code></p>                                  |
| Error : `Error`                    | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, object { Exception Exception } AdditionalInfo }</code></p> |
| Error.Message : `String`           | <p>Summary of the error.<br>Example: <code>Unable to retrieve contacts.</code></p>                                                                  |
| Error.AdditionalInfo : `Exception` | <p>Additional information about the error.<br>Example: <code>object { Exception Exception }</code></p>                                              |

## Task Changelog

Changelog for Task Frends.HubSpot.GetContacts.

### \[1.0.0] - 2025-07-30

#### Added

* Initial implementation


---

# 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.frends.com/tasks/tasks/hubspot/getcontacts.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.
