This page was recently updated. What do you think about it? Let us know!.

Connect HubSpot to your preprocessing pipeline, and use the Unstructured Ingest CLI or the Unstructured Ingest Python library to batch process all your documents and store structured outputs locally on your filesystem.

You will need:

The HubSpot prerequisites:

The HubSpot connector dependencies:

CLI, Python
pip install "unstructured-ingest[hubspot]"

You might also need to install additional dependencies, depending on your needs. Learn more.

The following environment variables:

  • HUBSPOT_API_TOKEN - The access token value for the HubSpot private app, represented by --api-token (CLI) or api_token (Python).
  • HUBSPOT_OBJECT_TYPES - A comma-separated list of strings (CLI) or an array of strings (Python) specifying one or more of the object types to access. This must be a subset of tickets, calls, emails, notes, tasks, products, and communications. These are represented by --object-types (CLI) or object_types (Python); if not specified, all of these object types are accessed by default.
  • HUBSPOT_PROPERTIES - Any filtering to be applied to specified object types, declared as a dictionary of key-value pairs (Python) specifying one or more of the default properties and their desired property values, represented by properties (Python). Not available in the CLI.
  • HUBSPOT_CUSTOM_PROPERTIES - Any custom properties to access. For the CLI, this is specified as a JSON-like string in the form "{\"<object_type>\":[\"<custom_property_id>\", ..., \"<custom_property_id>\"]}". For Python, this is specified as a Dict[str, List[str]]. This must map to the internal name of the variable. If the property is missing, it will be omitted. This is represented by --custom-properties (CLI) or custom_properties (Python).
  • HUBSPOT_PARAMS - For Python, an array of strings specifying any values to filter the customer properties on represented by params. Not available in the CLI.

These environment variables:

  • UNSTRUCTURED_API_KEY - Your Unstructured API key value.
  • UNSTRUCTURED_API_URL - Your Unstructured API URL.

Now call the Unstructured Ingest CLI or the Unstructured Ingest Python library. The destination connector can be any of the ones supported. This example uses the local destination connector: