Create List from a CSV source
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Lists,Tokens
Reads CSV (comma-separated values) and turns it into a list. Each row becomes one list item, with a property for each column.
The CSV can be text, for example from a form field or a token, or a .csv file on the site. After the action runs, [<ListName>:Count] holds the number of items in the list. You can then go through the list with Execute Actions for each List Entry, or use it with the other list actions.
The list only exists while the current actions run. It isn't saved anywhere.
This action requires the Excel feature package (EXGEN) to be licensed.
Typical Use Cases
- Import the rows of an uploaded CSV file into a table with Import List into Database
- Send an email to each person in a CSV file that a user uploads
- Process CSV text that a user pastes into a text area, or that an API returns
- Read a semicolon-, tab- or pipe-separated export from another system
Don't use it to
- Write a list to a CSV file. Use Create CSV from List instead.
- Read an Excel file. Use Create List from Excel (.xlsx) instead.
- Read JSON. Use Create List from JSON instead.
Related Actions
| Action Name | Description |
|---|---|
| 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. |
| Remap List | Renames or reshapes list properties, for example column names with spaces. |
| Create List from Excel (.xlsx) | Creates a list from an Excel sheet. |
| Create CSV from List | Does the opposite: writes a list as CSV. |
| Create List from CSV file (Obsolete) | The older, file-only version of this action. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| CSV Source | Where the CSV comes from: CSV text or CSV file. It only decides which of the next two parameters is shown. See CSV text or file. | No | CSV text | No |
| CSV | CSV text only. The CSV text, for example a token like [ImportData] or text you type in. Tokens in the text are replaced before it's read. | Yes | empty string | Yes, for CSV text |
| File / Field | CSV file only. 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, the parameter is called Field: 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, for CSV file |
| 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. See Lists that already exist. | 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. See Errors. | 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. |
Inside Execute Actions for each List Entry, use the properties as [ListName:PropertyName], for example [ContactsList:Email].
CSV text or file
- If CSV has a value, it's always used, even when CSV Source is
CSV file. Clear the CSV text before you switch to a file. - If both are empty, the action fails with
CSV not found. - Files are read as UTF-8. Files saved in another encoding, for example ANSI from older Excel versions, can show wrong characters for accents and symbols.
How rows and columns are read
- Quotes. Values can be wrapped in double quotes, so they can contain the separator or line breaks, for example
"Smith, John". Use two double quotes for a quote inside a value:"He said ""hi""". - Property names. With Use first row as column names on, the header text is used exactly as written, including spaces and case. If two columns have the same header, the last one's value is kept.
- Number of columns. The header row (or the first row, when there's no header) decides the columns. Missing values in a row are left empty. Extra values in a row are ignored.
- Blank lines are skipped.
- Values are text. Numbers and dates are kept as they're written in the CSV. Spaces around values aren't trimmed.
- Bad rows. If a row can't be parsed, its values are left empty and the problem is written to the log. The other rows are still read.
Lists that already exist
If a list with the same name already exists, the new rows are added to the end of it. The existing items and properties are kept, and the new columns are added as properties. [<List Name>:Count] counts all the items.
To start fresh, use a list name that isn't used yet in the current actions.
Errors
- These errors happen before reading starts, so the
On Erroractions don't run:CSV not found.when both the CSV text and the file are empty.In order to use the first row as a header, the input must be multi-line.when Use first row as column names is on and the CSV text has only one line.Please provide an entity name.when List Name is empty and there's no default list.
- For other errors, such as a missing file (
File not found!) or a CSV with no data rows, theOn Erroractions run first. Then the action still fails, unless anOn Erroraction ends execution itself, for example Stop Execution. - Low-code engineers and administrators see the original error. Other users see a generic message.
Considerations
- Set a List Name. In a listing, an empty name adds the CSV rows to the listing's default list instead of a new list.
- A header row needs data. A CSV with only a header row fails, because there are no data rows to read.
- Tokens in CSV text. Text in square brackets that matches a token is replaced. If your CSV data contains square brackets, pass it through a token, for example
[ImportData], instead of typing it in. - Names with spaces. Headers like
First Namebecome properties with spaces. Use Remap List if you want simpler names. - Large files. Every row is kept in memory as a list item. Very large files can slow down the request.
Examples
To understand how to use the below examples, please see Running Examples.
1. Create a list from CSV text
This action reads the CSV in the [ContactsCsv] token, for example text a user pasted into a form field. The first row has the column names, so each item gets Name and Email properties. The list is called ContactsList, and [ContactsList:Count] holds the number of rows.
{
"Title": "Create List from a CSV source",
"ActionType": "LoadEntitiesFromCSV",
"Description": "Read the pasted contacts",
"Parameters": {
"Source": "csvText",
"CSV": "[ContactsCsv]",
"FieldSeparator": {
"Expression": "",
"Value": "comma",
"IsExpression": false,
"Parameters": {}
},
"EntityName": "ContactsList",
"UseFirstRowAsColumnNames": true,
"OnError": []
}
}
For example, if [ContactsCsv] is:
Name,Email
Jane Doe,jane@example.com
"Smith, John",john@example.com
ContactsList gets two items, and [ContactsList:Count] is 2.
2. Read a semicolon-separated file
This action reads the file with the ID in the [FileId] token, for example from an API request or a workflow. The file uses semicolons and has no header row, so the properties are Field0, Field1 and so on. If reading fails, the error is logged before the action fails.
{
"Title": "Create List from a CSV source",
"ActionType": "LoadEntitiesFromCSV",
"Description": "Read the supplier price file",
"Parameters": {
"Source": "csvFile",
"FilePath": "[FileId]",
"FieldSeparator": {
"Expression": "",
"Value": "semicolon",
"IsExpression": false,
"Parameters": {}
},
"EntityName": "PricesList",
"UseFirstRowAsColumnNames": false,
"OnError": [
{
"Title": "Log Error",
"ActionType": "LogError",
"Parameters": {
"Message": "Price file import failed: [ExceptionMessage]"
}
}
]
}
}
Revised 09/27/2026