---
title: "How to Import Events from CSV/XLSX"
description: "Learn how to add Events into your database via CSV file"
url: https://help.user.com/en/articles/118-how-to-import-events-from-csvxlsx
collection: "Data Import & Export"
updated: 2026-08-14
language: en
alternates: [fr, pl, de, it, es]
---

# How to Import Events from CSV/XLSX

Learn how to add Events into your database via CSV file

Importing events from a CSV or XLSX file lets you add large amounts of event data to Positive User quickly and efficiently. Instead of creating events one by one, you can upload them in bulk and manage the whole process in a few simple steps. This article explains how to prepare your file and import it correctly into the platform.

## **Before You Start**

Before you begin, make sure your file is properly structured and that you understand how data is stored in Positive User. The platform uses both **standard attributes** (built-in fields such as email address or phone number) and **custom attributes** (fields you create yourself).

-   **Define events:** You need to create the events in the workspace first. [Follow the steps](https://help.user.com/en/articles/54-what-is-an-event.md).
    
-   **Create Custom Attributes:** If you want to include additional information about event occurrences, you need to create the relevant custom attributes first. Follow the steps in [“How to Create a Custom Attribute“](https://help.user.com/en/articles/38-how-to-create-a-custom-attribute.md)**.**
    
-   **Verify Data Types:** Make sure that each column has the correct attribute value type. For example, if you want to import "Scoring", make sure your attribute is an integer. If you want to import a "Date", set the attribute as datetime. Refer to [“What Is an Attribute”](https://help.user.com/en/articles/11-what-is-an-attribute.md) for details on specific data types.
    

## 1\. Prepare CSV/ XLSL File

Before uploading, ensure your file is formatted correctly. If you aren't sure how your file should look, you can download a ready-to-use template directly from the app by clicking the “xlsx” or “csv” button in the “Data” → “Import” section.

To find more tips about data formatting, check [our dedicated article](https://help.user.com/en/articles/109-csvxlsx-import-formatting-rules.md).

**Required Fields**

Importing events means that you upload specific event occurrences to the timelines of the contacts who performed them. (For example, history of purchases). Due to that it’s obligatory to connect each occurrences to a specific contact. It can be done via contact’s

-   **email**
    

OR

-   **user\_id**
    

> **Info:** The “user\_id” field should never be a simple integer. We highly recommend encoding it.

Also, the file must include

-   **event\_name** (name of the event defined in the app before)
    
-   **datetime** (timestamp of the event occurrences in ISO 8601 format e.g. 2017-07-25T14:14:08.612Z)
    

Additionally you can upload the event attributes for each event occurrence. These can be specific details crucial for statistics, automations or segmentation.

Event attributes in the file should be placed in the “**attrs**” column as JSON objects with { "key": "value"}

Example:

![](https://staticfiles.gleap.io/ghelparticle/jny2lUQDsXNGSVNVVmFxzQKcPq8nAgCWdfDBsbZCSfnE2ve5i5iJS28M9gGbVZWmK0Zml4TQdqI.png)

> **Info:** **Note a few things:
> **\- there is no separator between objects,
> \- each specific object is placed in the other column,
> \- not forget about closing curly bracket.

**Column Headings**

Always include column headings in the first row of your file. Try to give your columns exactly the same names as the existing in Positive User attributes have. If the column name is identical to the attribute name, the system will match them automatically during import.

**Encoding**

What is encoding? Encoding tells the computer how to interpret the text characters in your file. The default and most highly recommended format is UTF-8. Choosing UTF-8 ensures that special characters, accents, and symbols are imported correctly without turning into random symbols.

**Separator**

What is a separator? In CSV (Comma Separated Values) files, a separator is the punctuation mark used to divide your text into distinct spreadsheet columns. Common separators are commas (,) or semicolons (;).

> **Info:** Check how your spreadsheet software exported the file and ensure you know which character divides your data.

## **2\. Upload the File**

1.  Go to “**Data” → “Importers”** and choose “**Import** **Events”.**
    

![](https://staticfiles.gleap.io/gattachments/vjguFNO4aILyD9gKqcj7TAlZ8D6ModxBcQ4fUic6vVKJzknBiZTCIE44ud8MhzGVwTQA9CjZmwP.png)

![](https://staticfiles.gleap.io/gattachments/SSga8QkAFqUA2Mp4bn5y8K0LM808EF3dblaN1zEVlFyeMtPQ6F47BDtso0oEYoSX9gLVlovWES3.png)

OR

You can go with “**Settings**” → “**Workspace settings**” → “**Contact data & events**” → “**Events**” →  
“**Manage**” → “**Import events**”

![](https://staticfiles.gleap.io/gattachments/Zu1mAR8YfbMx37vSZt2NZ9y6b2wU8zWRIffMgqxFEs1raWTgFPXhT9mExVm44C4W6rUIwmL1qRH.png)

2.  Upload or drag&drop the file.
    
3.  Choose the encoding to be suitable to your file. (UTF-8 is a default one)
    
4.  Choose the separator used in your file.
    
5.  Click “Import”.
    

![](https://staticfiles.gleap.io/gattachments/g242pLERBIABLXisKrta0glbS3hwkUCFlREcWVXzlZm1YxeMuQuFtj6xfXBEo1WsRvqHwg0mcr6.png)

## 3\. Import Results

You can monitor the import process and check the final results in the “Import Results” section, where you are redirected automatically.

You can visit this section any time via “Data” → “Importers” → “Import Results” path.

Here you will see:

-   Import status (Started/Pending/Complete/Archived)
    
-   Date created
    
-   Completed at
    
-   Type (what kind of data was imported)
    
-   Created by (team member who uploaded the file)
    
-   File name
    
-   Total rows (from your file)
    
-   Succeeded (final number of rows imported)
    
-   Failed (shows number of failures)
    

If something goes wrong during the import, click on the file name to view a detailed error report.

To view the newly imported profiles, go to “Data” → “Contacts”. You can filter your database by the specific contact activity. Additionally you can check the event history in “Settings” → “Workspace settings” → “Contact data & events” → “Events”.

## Important Note

While editing your file in the Google sheet, there is one important rule. Every attribute object has to be inside single quotes, e.i. "key". Unfortunately, Google sheet omits a quote if it appears as a first character in the line. To get rid of that problem, you have to type a single quote twice. This way it'll be correct in that Google sheet and the csv file after it's been exported.

## **Related Articles**

-   [How to Import Contacts from CSV/XLSX](https://help.user.com/en/articles/103-how-to-import-contacts-from-csvxlsx.md)
    
-   [CSV/XLSX Import Formatting Rules](https://help.user.com/en/articles/109-csvxlsx-import-formatting-rules.md)
    
-   [CSV/XLSX Import Troubleshooting](https://help.user.com/en/articles/113-csvxlsx-import-troubleshooting.md)
