> For the complete documentation index, see [llms.txt](https://support.sayprimer.com/primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.sayprimer.com/primer/learn-more/upload-people-and-companies-to-primer-via-s3-beta/export-data-from-hightouch-to-primer-via-s3.md).

# Export Data from Hightouch to Primer via S3

Use Hightouch to export a complete people or company dataset as a CSV file to your Primer-provided Amazon S3 location.

Each export is a snapshot. Sending a new file with the same filename replaces the corresponding dataset in Primer, including removing records that are no longer present.

> **Beta availability**
>
> S3 ingestion is currently a beta feature. Contact your Primer representative or <support@sayprimer.com> before configuring Hightouch.

For more information about the underlying Hightouch features, see:

* [Hightouch Amazon S3 destination](https://hightouch.com/docs/destinations/s3)
* [Configure AWS credentials in Hightouch](https://hightouch.com/docs/security/aws)

### Before you begin

Ask your Primer representative for:

* The AWS role ARN Hightouch should assume
* Your S3 access-point alias
* Your assigned upload prefix
* The folder path for your people or company files

The upload paths follow this pattern:

```
<prefix>/datasets/people/
<prefix>/datasets/companies/
```

You also need:

* A Hightouch source connected to your data warehouse
* A Hightouch model containing the complete dataset you want to export
* Permission to add cloud credentials, destinations, and syncs in Hightouch

### 1. Start configuring the AWS credential

In Hightouch:

1. Go to **Settings → Cloud Providers**.
2. Select **Add cloud provider**.
3. Select **Amazon Web Services**.
4. Choose **Cross-account role**.
5. Give the credential a recognizable name, such as `Primer S3`.
6. Copy the AWS account ID and external ID displayed by Hightouch.

Use the AWS account ID displayed in your Hightouch workspace. Do not substitute an account ID from another workspace or documentation example.

Do not create another AWS role. Primer provides the narrowly scoped role used for this integration.

See [Configure AWS credentials in Hightouch](https://hightouch.com/docs/security/aws) for Hightouch’s cross-account authentication flow.

### 2. Send Hightouch’s identity to Primer

Send the following values to your Primer representative:

* Hightouch AWS account ID
* Hightouch external ID

Primer will add these values to the trust policy of your assigned upload role, authorizing Hightouch to assume it.

Primer will also configure the S3 permissions needed by Hightouch. Hightouch documents permissions for ordinary and multipart uploads, and its troubleshooting guidance also recommends object-read and bucket-listing permissions. Primer will scope the applicable permissions to your assigned access point and prefix.

Wait for Primer to confirm that the role has been configured.

### 3. Complete the AWS credential

After Primer confirms that the role is ready:

1. Return to the AWS cloud-provider setup in Hightouch.
2. Enter the role ARN provided by Primer.
3. Save the credential.
4. Confirm that Hightouch can assume the role.

If Hightouch reports a credentials or assume-role error, confirm that Primer used the exact AWS account ID and external ID generated for this credential.

Hightouch displays an external ID only once. Recreating the cloud credential generates a new external ID that Primer must add to the role’s trust policy.

### 4. Add the S3 destination

In Hightouch:

1. Go to **Destinations**.
2. Select **Add destination**.
3. Choose **Amazon S3**.
4. Select the AWS credential configured for Primer.
5. In **Bucket Name**, enter the S3 access-point alias provided by Primer.
6. Test the destination.
7. Save it after the test succeeds.

Enter only the access-point alias—not:

* An `s3://` URL
* The access-point ARN
* A folder path
* Primer’s underlying bucket name

Amazon S3 access-point aliases can be used in place of bucket names for the S3 operations required by Hightouch. Hightouch does not explicitly document access-point aliases, so the destination test must succeed before you continue.

For information about access-point behavior, see:

* [Amazon S3 access-point aliases](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-naming.html)
* [S3 access-point operation compatibility](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-service-api-support.html)

If the destination test fails, contact Primer. Do not substitute the underlying bucket name.

### 5. Prepare the Hightouch model

Create or select a model that returns every record you want Primer to retain.

Do not limit the model to records changed since the previous run. Every sync must contain a complete snapshot.

#### People fields

Include the following fields when available:

| Primer CSV header     | Example model field |
| --------------------- | ------------------- |
| `First Name`          | `first_name`        |
| `Last Name`           | `last_name`         |
| `Email`               | `email`             |
| `Person Linkedin Url` | `linkedin_url`      |
| `Company Name`        | `company_name`      |
| `Company Domain`      | `company_domain`    |
| `Country`             | `country`           |
| `State`               | `state`             |
| `City`                | `city`              |

For the best matching results, include email and LinkedIn profile URLs whenever available.

#### Company fields

Include the following fields when available:

| Primer CSV header | Example model field |
| ----------------- | ------------------- |
| `Company Name`    | `company_name`      |
| `Company Domain`  | `company_domain`    |
| `LinkedIn URL`    | `linkedin_url`      |
| `Country`         | `country`           |
| `State`           | `state`             |
| `City`            | `city`              |

For the best matching results, include a company domain, LinkedIn company page, or both.

Review the model results and confirm that the row count is reasonable before creating the sync.

### 6. Create the sync

Create a new Hightouch sync using:

* The model containing your complete dataset
* The Primer S3 destination
* **All** as the sync mode

> **Use All mode only**
>
> Do not use **Insert** or **Diff**. All mode creates one file containing every row returned by the model each time the sync runs. Insert and Diff produce incremental output that does not match Primer’s snapshot-replacement behavior.

See [Supported syncing in Hightouch’s S3 documentation](https://hightouch.com/docs/destinations/s3#supported-syncing) for details.

### 7. Configure the file

Use the following settings:

| Setting          | Value    |
| ---------------- | -------- |
| File format      | CSV      |
| Delimiter        | Comma    |
| Header row       | Enabled  |
| Byte order mark  | Disabled |
| Gzip compression | Disabled |
| PGP encryption   | Disabled |
| Batching         | Disabled |

Keep batching disabled so that each sync produces one file.

Hightouch supports CSV headers, column selection, and field renaming through its advanced mapper. See [Hightouch’s S3 sync configuration](https://hightouch.com/docs/destinations/s3#sync-configuration).

### 8. Set a fixed filename

Enter a complete object path relative to the access point.

For people:

```
<prefix>/datasets/people/contacts.csv
```

For companies:

```
<prefix>/datasets/companies/accounts.csv
```

Replace `<prefix>` with the exact prefix provided by Primer.

Do not include timestamp or sync variables such as:

```
{YYYY}
{MM}
{DD}
{HH}
{sync.id}
{sync.run.id}
```

Hightouch overwrites an existing file when the object path remains the same. This allows Primer to update one existing dataset.

Changing the filename creates a separate dataset in Primer.

See [Enter filename in Hightouch’s S3 documentation](https://hightouch.com/docs/destinations/s3#enter-filename) for supported filename behavior.

### 9. Map the CSV columns

If the model does not already use Primer’s CSV headers, use Hightouch’s advanced mapper to rename the exported fields.

When the advanced mapper is enabled, Hightouch exports only the fields explicitly mapped. Confirm that every field you want Primer to receive is included.

See [Columns to sync](https://hightouch.com/docs/destinations/s3#columns-to-sync) for Hightouch’s mapping behavior.

### 10. Run a test sync

Run the sync manually before enabling its recurring schedule.

After the first run:

1. Confirm that Hightouch reports a successful sync.
2. Wait 15–60 minutes.
3. Open the [CSV Imports page in Primer](https://my.sayprimer.com/connections?tab=CSV%20Imports).
4. Find the dataset associated with your filename.
5. Confirm that the expected records and fields appear.

Next, test the replacement behavior:

1. Change a value in the Hightouch model.
2. Remove at least one test record.
3. Run the same sync again.
4. Confirm that Hightouch writes to the same object path.
5. Wait for Primer to process the new snapshot.
6. Confirm that the changed value was updated.
7. Confirm that the removed record no longer appears.

Do not schedule the sync until both updates and removals have been verified.

### 11. Schedule the sync

After validating the replacement behavior:

1. Open the sync’s scheduling settings.
2. Select the desired recurring schedule.
3. Save and enable the schedule.
4. Configure sync alerts if your organization uses them.

Every scheduled run must continue to use:

* **All** sync mode
* The complete model result
* The same fixed filename
* One uncompressed CSV file
* A comma delimiter
* A header row

### Troubleshooting

#### The AWS credential fails

Confirm that:

* Primer used the account ID displayed in your Hightouch workspace.
* Primer configured the exact external ID generated for the credential.
* The role ARN matches the value provided by Primer.
* The external ID has not changed because the credential was recreated.

#### The S3 destination test fails

Confirm that:

* You entered the access-point alias as the bucket name.
* You did not enter an S3 URL, ARN, folder path, or underlying bucket name.
* Primer configured the required access-point and role permissions.

If the problem continues, contact Primer Support.

#### Every run creates a new dataset

Confirm that:

* The sync uses **All** mode.
* The object path does not contain timestamp or sync variables.
* The filename remains identical across runs.
* Batching is disabled.

#### The import appears as Failed in Primer

Confirm that:

* The output uses CSV format.
* The header row is enabled.
* The delimiter is a comma.
* BOM, gzip, and PGP encryption are disabled.
* The file is in the correct people or company folder.
* The mapped headers use Primer’s supported column names.

### Operational requirements

For every Hightouch sync:

* Export the complete dataset.
* Use **All** mode.
* Use one fixed filename.
* Keep batching and compression disabled.
* Do not include timestamp or sync variables in the filename.
* Keep people and company files in their corresponding folders.
* Review unexpected row-count changes before syncing.
* Do not run multiple syncs against the same filename concurrently.
* Do not replace Primer’s access-point alias with the underlying bucket name.

Contact Primer before changing the role, external ID, access point, prefix, folder, or filename.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.sayprimer.com/primer/learn-more/upload-people-and-companies-to-primer-via-s3-beta/export-data-from-hightouch-to-primer-via-s3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
