# Import a CSV File

URL: https://www.digia.tech/docs/user/connect-your-data/csv

Upload a CSV file of user IDs to Digia Engage to create an audience you can target, with optional properties from extra columns.

Upload a list of user IDs from anywhere (a spreadsheet, a data warehouse export, a CRM report) and target it as an audience. No connection to another tool is needed.

By the end, you should have:

- an audience created from your file
- optionally, properties from extra columns available in campaign text

## Before you start

Make sure you have:

- Audiences enabled for your Digia Engage project (see [Before you start](/docs/user/connect-your-data/#before-you-start) ).
- A `.csv` file (comma or tab separated) whose ID column holds the **same user IDs your app passes to `setUserId`** .
- To import properties: [user verification](/docs/user/connect-your-data/#turn-on-user-verification) turned on.

## Step 1: Prepare the file

The file needs one column of user IDs. Other columns are optional and can become properties.

```csv
user_id,plan,city
u_10293,gold,Mumbai
u_10294,silver,Pune
u_10295,gold,Delhi
```

- **One column only?** A header is optional. If the first row is `user_id` , `userid` or `id` , it is treated as a header. Anything else is treated as a user ID.
- **Several columns?** Include a header row. You'll tell Digia which column holds the IDs.
- **Limits:** 20 MB per file and 5,000,000 rows.

## Step 2: Open the upload dialog

Either:

- open **Data → Connectors** and click **+ Connect** on the **File upload (csv)** card, or
- open **Data → Audiences** , click **Import an audience** , and choose **Upload CSV file** .
![Import an audience menu on the Audiences tab with Upload CSV file](/docs/img/engage/user-guides/data/audiences-import-menu.webp) From the Audiences tab, choose Import an audience → Upload CSV file.
## Step 3: Upload the file

1. Enter an **Audience Name** , such as `VIP Customers Q3` .
2. If the file has several columns, enter the **ID Column Header** , for example `user_id` . Leave it empty only if the file has a single column.
3. Drag the file onto the drop zone, or click **browse** .
4. Optional: if the file has other columns, pick the ones to import under **Variables from the other columns** and name each one. The name is what you type in campaign text, for example `{{plan}}` . Until [user verification](/docs/user/connect-your-data/#turn-on-user-verification) is on, this shows *Variables need user verification* instead. The audience imports either way.
5. Click **Upload & Sync** .
![Upload CSV Audience dialog filled in with a name, the user_id column and a selected file](/docs/img/engage/user-guides/data/csv-upload.webp) Name the audience, say which column holds the user IDs, and add the file.You see *Audience created. Members will be processed shortly.*

## Step 4: Check the audience

Open **Data → Audiences** . Once the file is processed, the row shows how many people it holds and how many match an app user.

![CSV audience expanded on the Audiences tab, showing 4 identifiers and its match rate](/docs/img/engage/user-guides/data/csv-audience-detail.webp) Check the size and match rate once the file is processed. Here none of the IDs belong to an app user yet, so Digia flags the low match rate.Now [use the audience in a campaign](/docs/user/connect-your-data/#use-your-data-in-a-campaign) .

## Update the list

A CSV audience doesn't update by itself. To change it, click **Replace list** on its row and upload a new file.

![Replace Audience List dialog](/docs/img/engage/user-guides/data/csv-replace.webp) Replace list uploads a new file for an existing CSV audience.warning
Replacing is a full swap. Users who aren't in the new file are removed from the audience.

To change which columns are imported as properties, open **Data → Connectors** and click **Settings** on the **CSV Upload** row. These choices apply to every CSV audience, and Digia reads the uploaded files again when you click **Save variables** .

![File upload settings dialog with plan and city selected as variables](/docs/img/engage/user-guides/data/csv-settings.webp) Pick the columns to import and name each one. The name on the right is what you type in campaign text.
## Troubleshooting

| Message | What to do | **CSV file has multiple columns (a, b). Please specify the ID column header name.** | Enter the **ID Column Header** . | **Column "{x}" not found in CSV headers** | The header doesn't match. Check spelling; matching ignores case. | **CSV file is empty** | The file has no rows. | **Failed to parse CSV file** | Save the file as CSV (comma or tab separated) and try again. | **File size exceeds maximum allowed size of 20MB** | Split the file, or remove columns you don't need. | **CSV upload exceeds maximum limit of 5000000 members** | Split the list into several audiences. | **Only {n}% match an app user** | The IDs in the file aren't the ones your app passes to `setUserId` , or those users haven't opened the app yet.
