# Importing Records from a CSV File

*Skill Level: Intermediate*

## Before You Begin

* Know about [Databases](https://help.adalo.com/~/revisions/kmzOxqjy7C9sXGVjDKKb/database) and the basics of how to create them.
* Clone the [example app](https://previewer.adalo.com/751a5514-2eda-4317-b40f-e1190b141589) and download the [example CSV file](https://drive.google.com/uc?export=download\&id=1dIeebULF67KSOsGQaNnSOvcxfJLJ4Dfk).
* You do not need a paid Adalo plan to use this feature for up to 50 records.

## Walkthrough

{% tabs %}
{% tab title="Simple" %}
**1.)**  Another way to add records to your database manually is by importing a CSV file to your database. To start, click on the Database button <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhOpGvAygIGfn1vvPoa%2F-MhOpmSNVyv8g2A2as41%2FScreen%20Shot%202021-08-18%20at%2011.17.46%20AM.png?alt=media&#x26;token=f59c65e1-47cf-48e5-91e2-d8d7b9005904" alt="" data-size="line"> in the left-hand menu of the Adalo Builder, then click on **Records** <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhYfD-tBs44PQ6-8ZGM%2F-MhYltJphd9s7DMSTkty%2FScreen%20Shot%202021-08-20%20at%209.36.53%20AM.png?alt=media&#x26;token=88b770b5-de33-48d2-8069-0bd741ea52a1" alt="" data-size="line"> in the collection you want to import to.

**2.)** To upload a CSV, click the Upload button in the top right <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhTUzaEzB01xdSTRyNu%2F-MhTVZko6TQ8g3gN-JoS%2FScreen%20Shot%202021-08-19%20at%209.03.09%20AM.png?alt=media&#x26;token=3eb1d2f1-0116-4c39-a119-43789075c059" alt="" data-size="line"> of the records view, then select your CSV file to upload by clicking **Select a File** <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhTUzaEzB01xdSTRyNu%2F-MhTZv8J8TmirWrjWJn5%2FScreen%20Shot%202021-08-19%20at%209.22.12%20AM.png?alt=media&#x26;token=da871c6b-7ee5-409b-a1cd-224a4e3be59e" alt="" data-size="line"> then selecting the file on your computer.  If you do not have a CSV and want to try it with a sample app,  [click here](https://drive.google.com/uc?export=download\&id=1dIeebULF67KSOsGQaNnSOvcxfJLJ4Dfk) to download the CSV file and [click here](https://previewer.adalo.com/751a5514-2eda-4317-b40f-e1190b141589) to clone a sample app.

**3.)**  Adalo will try to automatically pair up the columns in the CSV file with any properties that exist in your database. You can choose not to import certain columns by selecting **None** in the dropdowns or assign them manually if they were not synced automatically. Most property types can be matched up provided they are formatted correctly in the CSV.  See the table below for how to properly format each property type.

| Property          | Format                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Text**          | Any formatting will work                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Number**        | Must be either whole, decimal, or negative. No symbols or letters.                                                                                                                                                                                                                                                                                                                                                             |
| **True/False**    | Value must either be **`true`** or left blank for false.                                                                                                                                                                                                                                                                                                                                                                       |
| **Date**          | Must be formatted as **MM/DD/YYYY** or **YYYY-MM-DD**                                                                                                                                                                                                                                                                                                                                                                          |
| **Date and Time** | Must be in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) Format such as **2022-07-04T02:00:00Z**.  Adalo interprets all datetime as UTC.                                                                                                                                                                                                                                                                                  |
| **Image**         | Not supported for import, but storage URL locations can be imported as text.                                                                                                                                                                                                                                                                                                                                                   |
| **File**          | Not supported for import, but storage URL locations can be imported as text.                                                                                                                                                                                                                                                                                                                                                   |
| **Relationships** | <p><strong>One-to-Many:</strong> Can be matched up as long as the first property of the records of the other collections are identical.  For instance, if importing Trips with a relationship to a user <john@test.com>, the Users collection must have a user with this email <em>and</em> have Email set as the first property in the collection. </p><p></p><p><strong>Many-to-Many:</strong> Not supported for import.</p> |

**4.)**  Once you have paired up the CSV columns and properties, click **Import Data** <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhZOy5Si4Xg5qmBxH2k%2F-MhZPjaDSvHcVExFavj8%2FScreen%20Shot%202021-08-20%20at%2012.35.20%20PM.png?alt=media&#x26;token=6ded9e52-ef92-4913-91a8-8315da461b84" alt="" data-size="line">.  If all goes well, you will see an **"Import Successful"** message.  If you receive an error, here are some troubleshooting steps:

* Try uploading records in batches of 10000 or less.
* Make sure any relationship fields *exactly* match existing records and that the collection's first property (or label) matches the column values in the CSV.
* Make sure the label fields (first property in a collection) are either a text or number field.
* Make sure date formats are correct
  {% endtab %}

{% tab title="In-Depth" %}
**1.)**  Another way to add records to your database manually is by importing a CSV file to your database. To start, click on the Database button <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhOpGvAygIGfn1vvPoa%2F-MhOpmSNVyv8g2A2as41%2FScreen%20Shot%202021-08-18%20at%2011.17.46%20AM.png?alt=media&#x26;token=f59c65e1-47cf-48e5-91e2-d8d7b9005904" alt="" data-size="line"> in the left-hand menu of the Adalo editor, then click on **Records** <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhYfD-tBs44PQ6-8ZGM%2F-MhYltJphd9s7DMSTkty%2FScreen%20Shot%202021-08-20%20at%209.36.53%20AM.png?alt=media&#x26;token=88b770b5-de33-48d2-8069-0bd741ea52a1" alt="" data-size="line"> in the collection you want to import to.

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhZRrKiEzFp7lUqJ8Tx%2F-MhZcm3yutYX3_0q09Hi%2Fopen%20database%20records.gif?alt=media\&token=9f9dc2dc-2689-4f45-921a-2e9e48964984)

**2.)** To upload a CSV, click the Upload button in the top right <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhTUzaEzB01xdSTRyNu%2F-MhTVZko6TQ8g3gN-JoS%2FScreen%20Shot%202021-08-19%20at%209.03.09%20AM.png?alt=media&#x26;token=3eb1d2f1-0116-4c39-a119-43789075c059" alt="" data-size="line"> of the records view, then select your CSV file to upload by clicking **Select a File** <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhTUzaEzB01xdSTRyNu%2F-MhTZv8J8TmirWrjWJn5%2FScreen%20Shot%202021-08-19%20at%209.22.12%20AM.png?alt=media&#x26;token=da871c6b-7ee5-409b-a1cd-224a4e3be59e" alt="" data-size="line"> then selecting the file on your computer.  If you do not have a CSV and want to try it with a sample app,  [click here](https://drive.google.com/uc?export=download\&id=1dIeebULF67KSOsGQaNnSOvcxfJLJ4Dfk) to download the CSV file and [click here](https://previewer.adalo.com/751a5514-2eda-4317-b40f-e1190b141589) to clone a sample app.

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhZRrKiEzFp7lUqJ8Tx%2F-MhZdVZu7U18pnQ89Mj5%2Fselect%20import.gif?alt=media\&token=df87f520-6556-4543-bbcd-068af5a7d5df)

**3.)**  Adalo will try to automatically pair up the columns in the CSV file with any properties that exist in your database. You can choose not to import certain columns by selecting **None** in the dropdowns or assign them manually if they were not synced automatically. Most property types can be matched up provided they are formatted correctly in the CSV.  See the table below for how to properly format each property type.

| Property          | Format                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Text**          | Any formatting will work                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Number**        | Must be either whole, decimal, or negative. No symbols or letters.                                                                                                                                                                                                                                                                                                                                                             |
| **True/False**    | Value must either be **`true`** or left blank for false.                                                                                                                                                                                                                                                                                                                                                                       |
| **Date**          | Must be formatted as **MM/DD/YYYY** or **YYYY-MM-DD**                                                                                                                                                                                                                                                                                                                                                                          |
| **Date and Time** | Must be in ISO 8601 Format such as **`2021-08-19T17:23:10Z`**.  Adalo interprets all datetime as UTC. You can use this [converter](https://app.adastacks.com/iso-converter) to convert dates to this format.                                                                                                                                                                                                                   |
| **Image**         | Not supported for import, but storage URL locations can be imported as text.                                                                                                                                                                                                                                                                                                                                                   |
| **File**          | Not supported for import, but storage URL locations can be imported as text.                                                                                                                                                                                                                                                                                                                                                   |
| **Relationships** | <p><strong>One-to-Many:</strong> Can be matched up as long as the first property of the records of the other collections are identical.  For instance, if importing Trips with a relationship to a user <john@test.com>, the Users collection must have a user with this email <em>and</em> have Email set as the first property in the collection. </p><p></p><p><strong>Many-to-Many:</strong> Not supported for import.</p> |

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhZRrKiEzFp7lUqJ8Tx%2F-MhZe2BkOT4z_cwl-5dZ%2Fpair%20columns.gif?alt=media\&token=3a0085fb-5d71-49b3-bbd1-1ef183cc064f)

**4.)**  Once you have paired up the CSV columns and properties, click **Import Data** <img src="https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhZOy5Si4Xg5qmBxH2k%2F-MhZPjaDSvHcVExFavj8%2FScreen%20Shot%202021-08-20%20at%2012.35.20%20PM.png?alt=media&#x26;token=6ded9e52-ef92-4913-91a8-8315da461b84" alt="" data-size="line">.  If all goes well, you will see an **"Import Successful"** message, then you can click **Done**.  If you receive an error, here are some troubleshooting steps:

* Try uploading records in batches of 10,000 or less.
* Make sure any relationship fields *exactly* match existing records and that the collection's first property (or label) matches the column values in the CSV.
* Make sure the label fields (first property in a collection) are either a text or number field.
* Make sure the date formats are correct
  {% endtab %}
  {% endtabs %}

## Example

Upon completing the import, you will see all your new records displayed in the database.

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-MhZRrKiEzFp7lUqJ8Tx%2F-MhZehQ2h7mUo2lHcllY%2Fresult.gif?alt=media\&token=909c5829-0f29-4fcc-942e-600ef2c6f857)

You can always clone the [example app](https://previewer.adalo.com/751a5514-2eda-4317-b40f-e1190b141589) used in this walkthrough as well as download the [example CSV](https://drive.google.com/uc?export=download\&id=1dIeebULF67KSOsGQaNnSOvcxfJLJ4Dfk) to give it a try yourself. &#x20;

## Learn More

* The column names of the CSV need not exactly match the property names in Adalo.<br>
* The columns do not need to be in the same order as the collection properties.<br>
* It's typically best to upload records in batches of 10,000 or less, but it's not uncommon for uploads to succeed when uploading far more than that.<br>
* Importing CSVs does not overwrite existing database records, it only adds to them.

## Help

If you need additional help with this article, you can always ask in our[ community forum](https://forum.adalo.com/)! Be sure to paste the link to this article in your post as well!

Do you have a tutorial or help doc request? [Let us know!](https://ideas.adalo.com/tutorial-requests)

tags: cvs, csv, import, upload
