

# HubSpot connector for Amazon AppFlow
HubSpot

HubSpot is a customer relations management (CRM) solution that supports marketing, sales, customer service, and content management. After you connect Amazon AppFlow your HubSpot account, you can use HubSpot as a data source or destination in your flows. Run these flows to transfer data between HubSpot and AWS services or other supported applications.

## Amazon AppFlow support for HubSpot


Amazon AppFlow supports HubSpot as follows.

**Supported as a data source?**  
Yes. You can use Amazon AppFlow to transfer data from HubSpot.

**Supported as a data destination?**  
Yes. You can use Amazon AppFlow to transfer data to HubSpot.

**Supported API versions**  
Amazon AppFlow can retrieve your data by sending requests to the following versions of the HubSpot API:  
+ v3
+ v2
+ v1

## Before you begin


To use Amazon AppFlow to transfer data from HubSpot to supported destinations, you must meet these requirements:
+ You have an account with HubSpot that contains the data that you want to transfer. For more information about the HubSpot data objects that Amazon AppFlow supports, see [Supported objects](#hubspot-objects).
+ You have an App Developers account with HubSpot Developers.
+ In HubSpot Developers, you've created an app for Amazon AppFlow. The app provides the client credentials that Amazon AppFlow uses to access your data securely when it makes authenticated calls to your account. For the steps to create an app, see [Creating and installing apps](https://developers.hubspot.com/docs/api/creating-an-app) in the HubSpot Developers documentation.
+ You've configured your app as follows:
  + You've specified a redirect URL for Amazon AppFlow.

    Redirect URLs have the following format:

    ```
    https://region.console.aws.amazon.com/appflow/oauth
    ```

    In this URL, *region* is the code for the AWS Region where you use Amazon AppFlow to transfer data from HubSpot. For example, the code for the US East (N. Virginia) Region is `us-east-1`. For that Region, the URL is the following:

    ```
    https://us-east-1.console.aws.amazon.com/appflow/oauth
    ```

    For the AWS Regions that Amazon AppFlow supports, and their codes, see [Amazon AppFlow endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/appflow.html) in the *AWS General Reference.*
  + You've permitted the following scopes:
    + `automation`
    + `content`
    + `crm.lists.read`
    + `crm.lists.write`
    + `crm.objects.companies.read`
    + `crm.objects.companies.write`
    + `crm.objects.contacts.read`
    + `crm.objects.contacts.write`
    + `crm.objects.custom.read`
    + `crm.objects.custom.write`
    + `crm.objects.deals.read`
    + `crm.objects.deals.write`
    + `crm.objects.owners.read`
    + `crm.schemas.custom.read`
    + `e-commerce`
    + `forms`
    + `oauth`
    + `sales-email-read`
    + `tickets`

    For more information about these scopes, see [Scopes](https://developers.hubspot.com/docs/api/working-with-oauth#scopes) in the HubSpot Developers documentation.

From your app settings, note your client ID and client secret because you specify these values in the connection settings in Amazon AppFlow.

## Connecting Amazon AppFlow to your HubSpot account
Connecting to HubSpot

To connect Amazon AppFlow to your HubSpot account, provide details from your HubSpot Developers app so that Amazon AppFlow can access your data. If you haven't yet configured your HubSpot account for Amazon AppFlow integration, see [Before you begin](#hubspot-prereqs).

**To connect to HubSpot**

1. Sign in to the AWS Management Console and open the Amazon AppFlow console at [https://console.aws.amazon.com/appflow/](https://console.aws.amazon.com/appflow/).

1. In the navigation pane on the left, choose **Connections**.

1. On the **Manage connections** page, for **Connectors**, choose **HubSpot**.

1. Choose **Create connection**.

1. In the **Connect to HubSpot** window, provide the client credentials from your app for **Client ID** and **Client secret**.

1. Optionally, under **Data encryption**, choose **Customize encryption settings (advanced)** if you want to encrypt your data with a customer managed key in the AWS Key Management Service (AWS KMS).

   By default, Amazon AppFlow encrypts your data with a KMS key that AWS creates, uses, and manages for you. Choose this option if you want to encrypt your data with your own KMS key instead.

   Amazon AppFlow always encrypts your data during transit and at rest. For more information, see [Data protection in Amazon AppFlow](data-protection.md).

   If you want to use a KMS key from the current AWS account, select this key under **Choose an AWS KMS key**. If you want to use a KMS key from a different AWS account, enter the Amazon Resource Name (ARN) for that key.

1. For **Connection name**, enter a name for your connection.

1. Choose **Connect**.

1. In the window that appears, sign in to your HubSpot account, and grant access to Amazon AppFlow.

On the **Manage connections** page, your new connection appears in the **Connections** table. When you create a flow that uses HubSpot as the data source, you can select this connection.

## Transferring data to or from HubSpot with a flow
Transferring data to or from HubSpot

To transfer data to or from HubSpot, create an Amazon AppFlow flow, and choose HubSpot as the data source or destination. For the steps to create a flow, see [Creating flows in Amazon AppFlow](create-flow.md).

When you configure a flow that uses HubSpot as the data source, you choose the data object that you want to transfer. For the objects that Amazon AppFlow supports for HubSpot, see [Supported objects](#hubspot-objects). You also choose the destination where you want to transfer the data object that you selected. For more information about how to configure your destination, see [Supported destinations](#hubspot-destinations).

## Supported destinations


When you create a flow that uses HubSpot as the data source, you can set the destination to any of the following connectors: 
+ [Amazon Lookout for Metrics](lookout.md)
+ [Amazon Redshift](redshift.md)
+ [Amazon RDS for PostgreSQL](connectors-amazon-rds-postgres-sql.md)
+ [Amazon S3](s3.md)
+ [HubSpot](#connectors-hubspot)
+ [Marketo](marketo.md)
+ [Salesforce](salesforce.md)
+ [SAP OData](sapodata.md)
+ [Snowflake](snowflake.md)
+ [Upsolver](upsolver.md)
+ [Zendesk](zendesk.md)
+ [Zoho CRM](connectors-zoho-crm.md)

## Supported objects


When you create a flow that uses HubSpot as the data source, you can transfer any of the following data objects to supported destinations:


**HubSpot API v3**  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/appflow/latest/userguide/connectors-hubspot.html)


**HubSpot API v2**  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/appflow/latest/userguide/connectors-hubspot.html)


**HubSpot API v1**  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/appflow/latest/userguide/connectors-hubspot.html)