> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Hubspot Get Marketing Email Statistics Histogram: Inputs,

> Get histogram marketing email statistics for a time span. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=hubspot_get_marketing_email_statistics_histogram:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                   | Type     | Required | Default | Description |
| ---------------------- | -------- | -------- | ------- | ----------- |
| `payload.query_params` | `record` | No       |         |             |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Query marketing email aggregate statistics.",
    "properties": {
      "query_params": {
        "type": "object",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              }
            }
          ]
        }
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `record` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "additionalProperties": {}
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute hubspot_get_marketing_email_statistics_histogram --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ````md theme={null}
  Source: https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/statistics

  Learn about the Statistics component for use in UI extensions.

  The `Statistics` component renders a visual spotlight of one or more data points. Includes the `StatisticsItem` and `StatisticsTrend` subcomponents.

  &lt;Frame>
    &lt;img alt="design-guidelines-statistics" />
  &lt;/Frame>

  1. `StatisticItem` **label:** the `statisticItem`'s label text.
  2. `StatisticItem` **number:** the `statisticItem`'s primary number.
  3. `StatisticTrend` **value:** the percentage trend value.
  4. `StatisticTrend` **direction:** the direction if the trend arrow (up or down).

  ```jsx theme={null}
  import { Statistics, StatisticsItem, StatisticsTrend } from "@hubspot/ui-extensions";

  const Extension = () => {
    return (
      &lt;Statistics>
        &lt;StatisticsItem label="Item A Sales" number="10000">
          &lt;StatisticsTrend direction="decrease" value="200%" />
        &lt;/StatisticsItem>
        &lt;StatisticsItem label="Item B Sales" number="100000">
          &lt;StatisticsTrend direction="increase" value="100%" />
        &lt;/StatisticsItem>
      &lt;/Statistics>
    );
  };
  ```

  ## Props

  **`&lt;StatisticsItem>` props**

  | Prop     | Type             | Description                                              |
  | -------- | ---------------- | -------------------------------------------------------- |
  | `id`     | String           | The statistic item's unique identifier.                  |
  | `label`  | String           | The item's label.                                        |
  | `number` | String \| number | The string to be displayed as the item's primary number. |

  **`&lt;StatisticsTrend>` props**

  | Prop        | Type                                   | Description                                  |
  | ----------- | -------------------------------------- | -------------------------------------------- |
  | `color`     | `'red'` \| `'green'`                   | The color of the trend arrow.                |
  | `direction` | `'increase'` (default) \| `'decrease'` | The direction of the trend arrow.            |
  | `value`     | String                                 | The text to be displayed as the trend value. |

  ## Variants

  In `StatisticsTrend` components, use the `direction` prop to describe whether the data is trend upwards or downwards.

  * `increase`: for additions or positive progression for a given time period.

  &lt;Frame>
    &lt;img alt="design-guidelines-increase-trend" />
  &lt;/Frame>

  * `decrease`: for subtractions or negative progression for a given time period.

  &lt;Frame>
    &lt;img alt="design-guidelines-decrease-trend" />
  &lt;/Frame>

  Note that the positive or negative movement of a given statistic is intended solely to represent the increase or decrease in numerical value. Be mindful of how these movements can communicate sentiment. For example, a decrease in support volume can be a net positive, which can be confusing when represented by a red, downward arrow.

  ## Usage examples

  * Calling out the progress of quarterly sales for a company.
  * Monitoring the amount of traffic and social media engagement that a contact has for the month.

  ## Guidelines

  * **DO:** keep statistics labels short and concise.
  * **DO:** place statistics components towards the top of a card when possible to enable users to more easily scan information without scrolling.
  * **DON'T:** include more than three statistics components per card if possible.
  * **DON'T:** use more than four statistics components side by side.
  * **DON'T:** include sensitive data that you don't want all users to see.

  ## Related components

  * [Table](/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/table)
  * [DescriptionList](/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/description-list)
  * [CrmPropertyList](/apps/developer-platform/add-features/ui-extensibility/ui-components/crm-data-components/crm-property-list)
  ````
</details>

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
