# Import contacts from a CSV file

> Prepare the file, map the columns, update existing contacts, and what an import means for marketing consent.

In **Contacts**, open **More options** and choose **Import from CSV**. Drop your file in the dialog, map the columns and start the import.

## Prepare the file

-   The first row holds the column names.
-   Save it as UTF-8. Excel: **Save as → CSV UTF-8**.
-   Up to 10,000 rows per import. Split bigger lists into several files.
-   Every row needs a name or an email address. Rows with neither are skipped.

These fields can be imported:

| Field | Notes |
| --- | --- |
| Name | Full name |
| Email | Used to find existing contacts |
| Phone |  |
| Labels | Several labels separated by commas, semicolons or \| |
| Company | Company name |
| City |  |
| Country | Two-letter country code, for example DE or US. Full country names don't work. |

Example:

```csv
name,email,phone,labels,company,city,country
Jane Miller,jane@acme.com,+1 555 0100,"vip, newsletter",Acme Inc.,Boston,US
Lukas Weber,lukas@example.de,,customer,,Berlin,DE
```

## Map the columns

After you drop the file, asktrix matches columns by their name, also in German (for example `E-Mail`, `Firma`, `Stadt`). Check the mapping under **Map columns** and change it where needed. Set columns you don't want to **— ignore —**.

**Preview** shows the first 5 rows as they'll be imported.

## Existing contacts

If a contact with the same email address already exists, it's updated instead of duplicated:

-   name, phone, city, country and company are overwritten with the values from the file. Empty cells don't delete existing values.
-   labels from the file are added to the existing labels.

When the import is done, you see how many contacts were created, updated and skipped.

## Marketing consent

Email campaigns only go to contacts with a documented opt-in for marketing emails. Contacts without it are left out automatically, and the campaign's audience preview shows how many that are.

By default, imported contacts get no marketing consent. An email address alone, or one a visitor typed into the chat widget, is not consent either.

If everyone in your file has agreed to receive marketing emails, for example because they signed up for your newsletter, tick **I confirm these contacts gave consent to receive marketing emails.** before you import. Then:

-   every imported contact with an email address gets marketing consent, with the source **Import**,
-   your confirmation, the date and your email address are stored as proof,
-   contacts that already had consent keep their existing proof,
-   contacts who unsubscribed stay unsubscribed. Only the contact can reverse that, by confirming a double opt-in email themselves.

The checkbox applies to the whole file. If only some of your contacts agreed, import them in two files: one with the box ticked, one without.

For contacts without consent, select them in **Contacts** and choose **Request consent**. They get a confirmation email (double opt-in), and once they click the link, they have consent with the source **Double opt-in**. On a single contact, **Send confirmation email** does the same, and **Record consent** lets you note consent you got elsewhere, for example on a paper form.

Chat campaigns, the messages shown inside the widget, don't need marketing consent. They skip blocked and unsubscribed contacts.

## After the import

Imported contacts are listed in **Contacts** like any other. Each one triggers the `contact.created` or `contact.updated` webhook, if you use webhooks.

---
Source: https://localhost:3100/help/en/import-contacts-from-csv
