Create List from CSV file (Obsolete)
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Lists,Tokens
Reads a CSV file and turns it into a list. Each row becomes one list item, with a property for each column. After the action runs, [<ListName>:Count] holds the number of items in the list.
This action is obsolete. Use Create List from a CSV source instead, with CSV Source set to CSV file. It reads files the same way, and it can also read CSV text. Existing actions keep working. See Moving to Create List from a CSV source.
This action requires the Excel feature package (EXGEN) to be licensed.
Typical Use Cases
- Keep existing applications that already use this action working until you replace it
Don't use it to
- Build anything new. Use Create List from a CSV source instead.
- Read CSV text from a field or token. Use Create List from a CSV source with CSV Source set to
CSV text. - Read an Excel file. Use Create List from Excel (.xlsx) instead.
Related Actions
| Action Name | Description |
|---|---|
| Create List from a CSV source | Replaces this action. Reads CSV text or a CSV file into a list. |
| Execute Actions for each List Entry | Runs actions once for each item in the list. |
| Import List into Database | Saves the list items into a SQL Server table. |
| Create CSV from List | Does the opposite: writes a list as CSV. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| FilePath | The CSV file to read. It can be a file ID, a relative URL, an absolute URL of a file on the site, a LinkClick URL or a physical path. In a form, select the Single File Upload field the user uploaded the file into, or switch to an expression to pass any of the other values. | Yes | empty string | Yes |
| Field Separator | The character between values: comma, semicolon, tab, pipe or colon. In expression mode, you can pass the name, for example semicolon, or the character itself, for example ;. Tab only works by name. Anything else is treated as a comma. | Yes | empty (comma) | No |
| List Name | The name of the list to create, for example ContactsList. If it's empty, the default list of the current context is used, for example the rows of a listing. If there's no default list, the action fails. If the list already exists, the new rows are added to the end of it. | Yes | empty string | Yes |
| Use first row as column names | Uses the first row as the property names. When it's off, every row is data and the properties are named Field0, Field1, Field2 and so on. | No | false | No |
| On Error | Actions to run if reading fails. They can use the [Exception], [ExceptionType], [ExceptionMessage] and [ExceptionStack] tokens. | No | empty | No |
Output Parameters Reference
| Output | Description |
|---|---|
List <List Name> | The list, one item per CSV row. |
[<List Name>:Count] | The number of items in the list, for example [ContactsList:Count]. If the list already had items, they're counted too. |
Moving to Create List from a CSV source
This action and Create List from a CSV source run the same code. The only difference is that this one can't read CSV text. The parameters map one to one:
| This action | Create List from a CSV source |
|---|---|
| (none) | CSV Source: set to CSV file |
| FilePath | File (Field in a form), same value |
| Field Separator | Field Separator, same value |
| List Name | List Name, same value |
| Use first row as column names | Use first row as column names, same value |
| On Error | On Error, same actions |
The parameter IDs are the same too. In an exported action, change ActionType from LoadEntitiesFromCSVFile to LoadEntitiesFromCSV and add "Source": "csvFile".
The list, the [<List Name>:Count] token, and the way rows, quotes and errors are handled don't change. See Create List from a CSV source for the details.
Considerations
- The file must exist. If it can't be found, the action fails with
File not found!after running theOn Erroractions. - Files are read as UTF-8. Other encodings can show wrong characters for accents and symbols.
- A header row needs data. A file with only a header row fails.
- If FilePath is empty, the action fails with
CSV not found.TheOn Erroractions don't run for this error.
Examples
To understand how to use the below examples, please see Running Examples.
1. Read a CSV file (old action)
This action reads the file with the ID in the [FileId] token. The first row has the column names. The list is called ContactsList.
{
"Title": "Create List from CSV file (Obsolete)",
"ActionType": "LoadEntitiesFromCSVFile",
"Description": "Read the contacts file",
"Parameters": {
"FilePath": "[FileId]",
"FieldSeparator": {
"Expression": "",
"Value": "comma",
"IsExpression": false,
"Parameters": {}
},
"EntityName": "ContactsList",
"UseFirstRowAsColumnNames": true,
"OnError": []
}
}
2. The same action, moved to Create List from a CSV source
This action does exactly the same as example 1, using the current action.
{
"Title": "Create List from a CSV source",
"ActionType": "LoadEntitiesFromCSV",
"Description": "Read the contacts file",
"Parameters": {
"Source": "csvFile",
"FilePath": "[FileId]",
"FieldSeparator": {
"Expression": "",
"Value": "comma",
"IsExpression": false,
"Parameters": {}
},
"EntityName": "ContactsList",
"UseFirstRowAsColumnNames": true,
"OnError": []
}
}
Revised 09/27/2026