Operations (sample payloads)

Main operations
Copy

Add Column
Copy

Add a new column to the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"name": "Total Sales",
4
"type": "number",
5
"default_value": 0,
6
"format": "0,0.00",
7
"after": "Product Name"
8
}

Sample Output

1
{
2
"success": true
3
}

Add Row
Copy

Add a new row to the end of the CSV

Sample Input

1
{
2
"id": "csv_12345",
3
"cells": {
4
"Name": "John Doe",
5
"Age": "30",
6
"Email": "john.doe@example.com",
7
"Subscribed": true,
8
"Balance": 1000.5
9
},
10
"stringify_boolean": true,
11
"allow_null": false,
12
"timeout_millis": 5000
13
}

Sample Output

1
{
2
"success": true
3
}

Add Rows
Copy

Add multiple rows to the end of the CSV

Sample Input

1
{
2
"id": "csv_12345",
3
"rows": [
4
{
5
"name": "John Doe",
6
"age": 30,
7
"email": "john.doe@example.com",
8
"is_active": true
9
},
10
{
11
"name": "Jane Smith",
12
"age": 28,
13
"email": "jane.smith@example.com",
14
"is_active": false
15
},
16
{
17
"name": "Bob Johnson",
18
"age": 35,
19
"email": "bob.johnson@example.com",
20
"is_active": true
21
}
22
],
23
"validate_columns": true,
24
"default_value": "",
25
"stringify_boolean": true,
26
"allow_null": false
27
}

Sample Output

1
{
2
"rows_inserted": 3,
3
"rows_not_inserted": 0,
4
"error_rows": {
5
"message": "",
6
"errorRows": []
7
}
8
}

Create CSV
Copy

Create a temporary CSV for use within the current workflow execution. You can perform operations on this CSV within a single workflow execution, but will need to export the CSV at the end otherwise it will be deleted.

Sample Input

1
{
2
"scope": "current_run",
3
"number_of_columns": 5,
4
"columns": [
5
{
6
"name": "Name",
7
"type": "text"
8
},
9
{
10
"name": "Age",
11
"type": "number"
12
},
13
{
14
"name": "Salary",
15
"type": "large_number"
16
},
17
{
18
"name": "Performance Score",
19
"type": "double",
20
"format": "0.00"
21
},
22
{
23
"name": "Hire Date",
24
"type": "date",
25
"format": "YYYY-MM-DD"
26
}
27
],
28
"number_of_rows": 3,
29
"use_utf8": false
30
}

Sample Output

1
{
2
"id": "csv_12345abcde",
3
"columns": [
4
{
5
"name": "Name",
6
"type": "text"
7
},
8
{
9
"name": "Age",
10
"type": "number"
11
},
12
{
13
"name": "Salary",
14
"type": "large_number"
15
},
16
{
17
"name": "Performance Score",
18
"type": "double",
19
"format": "0.00"
20
},
21
{
22
"name": "Hire Date",
23
"type": "date",
24
"format": "YYYY-MM-DD"
25
}
26
],
27
"rows": 3,
28
"errors": 0
29
}

Create CSV From File
Copy

Create a temporary CSV for use within the current workflow execution from an existing file. You can perform operations on this CSV within a single workflow execution, but will need to export the CSV at the end otherwise it will be deleted.

Sample Input

1
{
2
"file_url": "https://example.com/sales_data.csv",
3
"delimiter": "comma",
4
"has_header": true,
5
"scope": "current_run",
6
"escape_char": "\\",
7
"enclose_char": "\"",
8
"end_line": "auto_detect",
9
"validate_csv_settings": true,
10
"default_text_type": {
11
"length_limit": 100
12
},
13
"column_types": [
14
{
15
"name": "Date",
16
"type": "date",
17
"format": "YYYY-MM-DD"
18
},
19
{
20
"name": "Revenue",
21
"type": "number",
22
"format": "0,0.00"
23
}
24
],
25
"column_indices": [
26
{
27
"column_names": [
28
"Date",
29
"Product"
30
]
31
}
32
],
33
"whitelisted_columns": [
34
"Date",
35
"Product",
36
"Revenue",
37
"Quantity"
38
]
39
}

Sample Output

1
{
2
"id": "csv_12345abcde",
3
"columns": [
4
{
5
"name": "Date",
6
"type": "date",
7
"format": "YYYY-MM-DD"
8
},
9
{
10
"name": "Product",
11
"type": "text"
12
},
13
{
14
"name": "Revenue",
15
"type": "number",
16
"format": "0,0.00"
17
},
18
{
19
"name": "Quantity",
20
"type": "number"
21
}
22
],
23
"rows": 1000
24
}

Create CSV From XLSX File
Copy

Create a temporary CSV for use within the current workflow execution from an existing XLSX file. You can perform operations on this CSV within a single workflow execution, but will need to export the CSV at the end otherwise it will be deleted.

Sample Input

1
{
2
"file_url": "https://example.com/sales_data.xlsx",
3
"scope": "current_run",
4
"worksheets_to_extract": {
5
"worksheet_names": [
6
"Sales 2022",
7
"Sales 2023"
8
]
9
},
10
"has_header": true,
11
"column_types": [
12
[
13
{
14
"name": "Date",
15
"type": "date",
16
"format": "YYYY-MM-DD"
17
},
18
{
19
"name": "Revenue",
20
"type": "number",
21
"format": "0,0.00"
22
},
23
{
24
"name": "Product",
25
"type": "text"
26
}
27
],
28
[
29
{
30
"name": "Date",
31
"type": "date",
32
"format": "YYYY-MM-DD"
33
},
34
{
35
"name": "Revenue",
36
"type": "number",
37
"format": "0,0.00"
38
},
39
{
40
"name": "Product",
41
"type": "text"
42
}
43
]
44
],
45
"ignore_rows": 0,
46
"use_utf8": false
47
}

Sample Output

1
{
2
"results": [
3
{
4
"id": "csv_1234567890",
5
"columns": [
6
{
7
"name": "Date",
8
"type": "date",
9
"format": "YYYY-MM-DD"
10
},
11
{
12
"name": "Revenue",
13
"type": "number",
14
"format": "0,0.00"
15
},
16
{
17
"name": "Product",
18
"type": "text"
19
}
20
],
21
"rows": 250
22
},
23
{
24
"id": "csv_0987654321",
25
"columns": [
26
{
27
"name": "Date",
28
"type": "date",
29
"format": "YYYY-MM-DD"
30
},
31
{
32
"name": "Revenue",
33
"type": "number",
34
"format": "0,0.00"
35
},
36
{
37
"name": "Product",
38
"type": "text"
39
}
40
],
41
"rows": 180
42
}
43
],
44
"errors": []
45
}

Create CSV From XML File
Copy

Create a temporary CSV for use within the current workflow execution from an existing XML file. You can perform operations on this CSV within a single workflow execution, but will need to export the CSV at the end otherwise it will be deleted.

Sample Input

1
{
2
"file_url": "https://example.com/data.xml",
3
"scope": "current_run",
4
"identifier": "item",
5
"column_names": [
6
"id",
7
"name",
8
"price",
9
"category",
10
"date_added"
11
],
12
"column_types": [
13
{
14
"name": "id",
15
"type": "number"
16
},
17
{
18
"name": "price",
19
"type": "double",
20
"format": "0.00"
21
},
22
{
23
"name": "date_added",
24
"type": "date",
25
"format": "YYYY-MM-DD"
26
}
27
],
28
"use_utf8": true
29
}

Sample Output

1
{
2
"id": "csv_12345abcde",
3
"columns": [
4
{
5
"name": "id",
6
"type": "number"
7
},
8
{
9
"name": "name",
10
"type": "text"
11
},
12
{
13
"name": "price",
14
"type": "double",
15
"format": "0.00"
16
},
17
{
18
"name": "category",
19
"type": "text"
20
},
21
{
22
"name": "date_added",
23
"type": "date",
24
"format": "YYYY-MM-DD"
25
}
26
],
27
"rows": 1000
28
}

Delete a CSV
Copy

Delete a specific CSV created in Current Run and Account scope.

Sample Input

1
{
2
"id": "csv_12345abcde"
3
}

Sample Output

1
{
2
"deleted": true
3
}

Delete column
Copy

Delete a specific column in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"column": "Age",
4
"do_not_fail_on_non_existing": true
5
}

Sample Output

1
{
2
"success": true
3
}

Delete columns
Copy

Delete multiple column in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"columns": [
4
"Age",
5
"Phone Number",
6
"Address"
7
]
8
}

Sample Output

1
{
2
"success": true
3
}

Delete Row
Copy

Delete a specific row in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"row": 3
4
}

Sample Output

1
{
2
"success": true
3
}

Delete Rows
Copy

Delete a number of rows in the csv.

Sample Input

1
{
2
"id": "csv_12345",
3
"start": 3,
4
"count": 2
5
}

Sample Output

1
{
2
"success": true
3
}

Delete Rows By Filter
Copy

Delete all rows that match a specific filter.

Sample Input

1
{
2
"id": "csv_12345",
3
"filters": [
4
{
5
"column": "age",
6
"operator": ">",
7
"value": "30"
8
},
9
{
10
"match_any": [
11
{
12
"column": "city",
13
"operator": "=",
14
"value": "New York"
15
},
16
{
17
"column": "city",
18
"operator": "=",
19
"value": "Los Angeles"
20
}
21
]
22
}
23
]
24
}

Sample Output

1
{
2
"deleted": 15
3
}

Duplicate
Copy

Create a copy of a specific CSV

Sample Input

1
{
2
"id": "csv_12345abcde",
3
"scope": "account"
4
}

Sample Output

1
{
2
"id": "csv_67890fghij"
3
}

Duplicate Column
Copy

Duplicate a specific column in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"column": "First Name",
4
"new_name": "First Name Copy"
5
}

Sample Output

1
{
2
"success": true
3
}

Export CSV
Copy

Export an in memory CSV into a file for persistence and use elsewhere.

Sample Input

1
{
2
"id": "csv_12345",
3
"include_header": true,
4
"name": "employee_data.csv",
5
"sort": [
6
{
7
"name": "last_name",
8
"direction": "ASC"
9
},
10
{
11
"name": "first_name",
12
"direction": "ASC"
13
}
14
],
15
"delimiter": "comma",
16
"escape_char": "\"",
17
"enclose_char": "\"",
18
"force_enclose": true,
19
"enclose_headers": false,
20
"rfc_4180": {
21
"enabled": true,
22
"lines_terminated_by": "\n"
23
},
24
"null_override_options": {
25
"text_null_override": "N/A",
26
"number_null_override": 0
27
},
28
"filters": [
29
{
30
"column": "department",
31
"operator": "=",
32
"value": "Sales"
33
},
34
{
35
"match_any": [
36
{
37
"column": "salary",
38
"operator": ">",
39
"value": "50000"
40
},
41
{
42
"column": "years_of_service",
43
"operator": ">=",
44
"value": "5"
45
}
46
]
47
}
48
]
49
}

Sample Output

1
{
2
"file": {
3
"name": "employee_data.csv",
4
"url": "https://example.com/files/employee_data.csv",
5
"mime_type": "text/csv",
6
"expires": 1623456789
7
}
8
}

Export File
Copy

Export an in memory CSV data into a plain text file using a template configuration

Sample Input

1
{
2
"id": "csv_12345",
3
"name": "exported_data.csv",
4
"line_template": "{{Name}},{{Email}},{{Age}}",
5
"include_header": true,
6
"sort": [
7
{
8
"name": "Age",
9
"direction": "DESC"
10
}
11
],
12
"mime_type": "text/csv",
13
"filters": [
14
{
15
"column": "Age",
16
"operator": ">",
17
"value": "25"
18
}
19
]
20
}

Sample Output

1
{
2
"file": {
3
"name": "exported_data.csv",
4
"url": "https://example.com/files/exported_data.csv",
5
"mime_type": "text/csv",
6
"expires": 1623456789
7
}
8
}

Export JSON
Copy

Export an in memory CSV into a JSON file for persistence and use elsewhere.

Sample Input

1
{
2
"id": "csv_12345",
3
"name": "customer_data.json",
4
"row": 1,
5
"count": 100,
6
"export_individual_json_rows": false,
7
"file_structure": [
8
{
9
"key": "customer.id",
10
"column": "CustomerID"
11
},
12
{
13
"key": "customer.name",
14
"column": "FullName"
15
},
16
{
17
"key": "customer.email",
18
"column": "EmailAddress"
19
},
20
{
21
"key": "customer.address.street",
22
"column": "StreetAddress"
23
},
24
{
25
"key": "customer.address.city",
26
"column": "City"
27
},
28
{
29
"key": "customer.address.country",
30
"column": "Country"
31
},
32
{
33
"key": "customer.subscription.plan",
34
"column": "SubscriptionPlan"
35
},
36
{
37
"key": "customer.subscription.status",
38
"column": "SubscriptionStatus"
39
}
40
]
41
}

Sample Output

1
{
2
"total": 100,
3
"file": {
4
"name": "customer_data.json",
5
"url": "https://example.com/files/customer_data.json",
6
"mime_type": "application/json",
7
"expires": 1623456789
8
}
9
}

Find Row
Copy

Find the first row in the table that matches a specific filter.

Sample Input

1
{
2
"id": "csv_12345",
3
"filters": [
4
{
5
"column": "age",
6
"operator": ">",
7
"value": "30"
8
},
9
{
10
"match_any": [
11
{
12
"column": "city",
13
"operator": "=",
14
"value": "New York"
15
},
16
{
17
"column": "city",
18
"operator": "=",
19
"value": "Los Angeles"
20
}
21
]
22
}
23
]
24
}

Sample Output

1
{
2
"found": true,
3
"row": "2",
4
"data": {
5
"name": "John Doe",
6
"age": "35",
7
"city": "New York",
8
"occupation": "Software Engineer"
9
}
10
}

Find Rows By Filter
Copy

Find rows in the table that match a specific filter.

Sample Input

1
{
2
"id": "csv_12345",
3
"filters": [
4
{
5
"match_all": [
6
{
7
"column": "age",
8
"operator": ">",
9
"value": "30"
10
},
11
{
12
"column": "city",
13
"operator": "in",
14
"value": [
15
"New York",
16
"Los Angeles",
17
"Chicago"
18
]
19
}
20
]
21
},
22
{
23
"match_any": [
24
{
25
"column": "job_title",
26
"operator": "like",
27
"value": "%Manager%"
28
},
29
{
30
"column": "salary",
31
"operator": ">=",
32
"value": "100000"
33
}
34
]
35
}
36
]
37
}

Sample Output

1
{
2
"found": true,
3
"rowCount": 3,
4
"data": [
5
{
6
"id": "1",
7
"name": "John Doe",
8
"age": "35",
9
"city": "New York",
10
"job_title": "Senior Manager",
11
"salary": "120000"
12
},
13
{
14
"id": "2",
15
"name": "Jane Smith",
16
"age": "42",
17
"city": "Los Angeles",
18
"job_title": "Director",
19
"salary": "150000"
20
},
21
{
22
"id": "3",
23
"name": "Mike Johnson",
24
"age": "38",
25
"city": "Chicago",
26
"job_title": "Project Manager",
27
"salary": "95000"
28
}
29
]
30
}

Format CSV
Copy

Change the characters (such as delimiter and escape character) used in a CSV. This operation may be required for CSVs with embedded new lines and quote character in cell values.

Sample Input

1
{
2
"file": {
3
"name": "input.csv",
4
"url": "https://example.com/input.csv",
5
"mime_type": "text/csv",
6
"expires": 1623456789
7
},
8
"input_csv_characters": {
9
"delimiter": "comma",
10
"endline": "Unix / LF",
11
"escape_character": "\\",
12
"enclose_character": "\""
13
},
14
"output_csv_characters": {
15
"delimiter": "pipe",
16
"endline": "Windows / CRLF",
17
"escape_character": "\\",
18
"enclose_character": "'",
19
"force_quotes": true
20
}
21
}

Sample Output

1
{
2
"file": {
3
"name": "formatted_output.csv",
4
"url": "https://example.com/formatted_output.csv",
5
"mime_type": "text/csv",
6
"expires": 1623457789
7
}
8
}

Generate columns from object
Copy

Generate a list of column descriptions from a JSON object (ignoring nested arrays and objects), and provide optional column type definitions to change the types of some fields.

Sample Input

1
{
2
"object": {
3
"id": 1234,
4
"name": "John Doe",
5
"email": "john.doe@example.com",
6
"age": 30,
7
"is_active": true,
8
"registration_date": "2023-05-15T10:30:00Z",
9
"balance": 1234.56
10
},
11
"column_types_override": [
12
{
13
"name": "registration_date",
14
"type": "date",
15
"format": "YYYY-MM-DD"
16
},
17
{
18
"name": "balance",
19
"type": "double",
20
"format": "0,0.00"
21
}
22
]
23
}

Sample Output

1
{
2
"result": {
3
"columns": [
4
{
5
"name": "id",
6
"type": "number"
7
},
8
{
9
"name": "name",
10
"type": "text"
11
},
12
{
13
"name": "email",
14
"type": "text"
15
},
16
{
17
"name": "age",
18
"type": "number"
19
},
20
{
21
"name": "is_active",
22
"type": "text"
23
},
24
{
25
"name": "registration_date",
26
"type": "date",
27
"format": "YYYY-MM-DD"
28
},
29
{
30
"name": "balance",
31
"type": "double",
32
"format": "0,0.00"
33
}
34
],
35
"number_of_columns": 7
36
}
37
}

Get Cell
Copy

Return the data in a specifc cell in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"row": 3,
4
"cell": "email"
5
}

Sample Output

1
{
2
"found": true,
3
"row": 3,
4
"cell": "email",
5
"data": "john.doe@example.com",
6
"type": "string"
7
}

Get Column Count
Copy

Return the number of columns that are available in an in memory CSV.

Sample Input

1
{
2
"id": "csv_12345"
3
}

Sample Output

1
{
2
"columns": 5
3
}

Get column from rows
Copy

Return a single column from a number of rows from in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"column": "email",
4
"row": 2,
5
"count": 3
6
}

Sample Output

1
{
2
"found": true,
3
"total": 3,
4
"rows": [
5
"john.doe@example.com",
6
"jane.smith@example.com",
7
"mike.johnson@example.com"
8
]
9
}

Get Row
Copy

Return all columns from single row in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"row": 3
4
}

Sample Output

1
{
2
"found": true,
3
"row": 3,
4
"data": {
5
"name": "John Doe",
6
"email": "johndoe@example.com",
7
"age": "35",
8
"city": "New York"
9
}
10
}

Get Row Count
Copy

Return the number of rows that are available in an in memory CSV. This doesn't take into account content.

Sample Input

1
{
2
"id": "csv_12345"
3
}

Sample Output

1
{
2
"rows": 1000
3
}

Get Rows
Copy

Return all columns from a number of rows from in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"row": 1,
4
"count": 3
5
}

Sample Output

1
{
2
"found": true,
3
"total": 3,
4
"rows": [
5
{
6
"Name": "John Doe",
7
"Email": "john.doe@example.com",
8
"Age": "35"
9
},
10
{
11
"Name": "Jane Smith",
12
"Email": "jane.smith@example.com",
13
"Age": "28"
14
},
15
{
16
"Name": "Bob Johnson",
17
"Email": "bob.johnson@example.com",
18
"Age": "42"
19
}
20
]
21
}

Import Data
Copy

Import an external CSV file into an existing in memory CSV

Sample Input

1
{
2
"id": "csv_12345",
3
"file_url": "https://example.com/data.csv",
4
"has_header": true,
5
"delimiter": "comma",
6
"escape_char": "\\",
7
"enclose_char": "\"",
8
"end_line": "auto_detect",
9
"max_header_length": 10000,
10
"max_first_row_length": 65535,
11
"validate_csv_settings": true
12
}

Sample Output

1
{
2
"id": "csv_12345",
3
"success": true,
4
"rows": 1000
5
}

Join CSVs
Copy

Join two CSVs together based on a common field, using a left, inner or outer join. Indexes will automatically be created on for the columns chosen.

Sample Input

1
{
2
"left_id": "csv_123456",
3
"left_column": "employee_id",
4
"right_id": "csv_789012",
5
"right_column": "id",
6
"join": "Inner",
7
"scope": "current_run"
8
}

Sample Output

1
{
2
"id": "csv_345678",
3
"columns": [
4
{
5
"name": "employee_id",
6
"type": "string",
7
"format": ""
8
},
9
{
10
"name": "first_name",
11
"type": "string",
12
"format": ""
13
},
14
{
15
"name": "last_name",
16
"type": "string",
17
"format": ""
18
},
19
{
20
"name": "department",
21
"type": "string",
22
"format": ""
23
},
24
{
25
"name": "salary",
26
"type": "number",
27
"format": "currency"
28
}
29
],
30
"rows": 150
31
}

Parse Text
Copy

Parse raw CSV text into a list of rows

Sample Input

1
{
2
"text": "Name,Age,City\nJohn Doe,30,New York\nJane Smith,25,Los Angeles\nMike Johnson,35,Chicago",
3
"delimiter": "comma",
4
"escape_char": "\""
5
}

Sample Output

1
{
2
"rows": [
3
[
4
"Name",
5
"Age",
6
"City"
7
],
8
[
9
"John Doe",
10
"30",
11
"New York"
12
],
13
[
14
"Jane Smith",
15
"25",
16
"Los Angeles"
17
],
18
[
19
"Mike Johnson",
20
"35",
21
"Chicago"
22
]
23
]
24
}

Rename Column
Copy

Rename a specific column in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"column": "First Name",
4
"new_name": "Given Name"
5
}

Sample Output

1
{
2
"success": true
3
}

Rename Columns
Copy

Rename a number column in the CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"columns": [
4
{
5
"column": "First Name",
6
"new_name": "FirstName"
7
},
8
{
9
"column": "Last Name",
10
"new_name": "LastName"
11
},
12
{
13
"column": "Phone Number",
14
"new_name": "PhoneNumber"
15
}
16
]
17
}

Sample Output

1
{
2
"success": true
3
}

Sort CSV
Copy

Sorts a CSV.

Sample Input

1
{
2
"id": "csv_12345",
3
"sort": [
4
{
5
"name": "Age",
6
"direction": "ASC"
7
},
8
{
9
"name": "LastName",
10
"direction": "DESC"
11
}
12
],
13
"make_copy": true
14
}

Sample Output

1
{
2
"id": "csv_67890",
3
"success": true
4
}

Update by Function
Copy

Update a single column in multiple rows using a function

Sample Input

1
{
2
"id": "csv_123456",
3
"column": "email",
4
"function": {
5
"trim__text": {
6
"column__name": "email"
7
}
8
},
9
"filters": [
10
{
11
"column": "status",
12
"operator": "=",
13
"value": "active"
14
}
15
]
16
}

Sample Output

1
{
2
"affected_rows": 150
3
}

Update Cell
Copy

Update a specific cell in the CSV

Sample Input

1
{
2
"id": "csv_12345",
3
"row": 3,
4
"cell": "Email",
5
"value": "john.doe@example.com"
6
}

Sample Output

1
{
2
"success": true
3
}

Update Rows by Filter
Copy

Set new values in all rows matching given filters, in the CSV

Sample Input

1
{
2
"id": "csv_12345",
3
"cells": {
4
"Status": "Completed",
5
"LastUpdated": "2023-05-15"
6
},
7
"stringify_boolean": true,
8
"filters": [
9
{
10
"column": "OrderDate",
11
"operator": ">=",
12
"value": "2023-01-01"
13
},
14
{
15
"match_any": [
16
{
17
"column": "Category",
18
"operator": "=",
19
"value": "Electronics"
20
},
21
{
22
"column": "Category",
23
"operator": "=",
24
"value": "Appliances"
25
}
26
]
27
}
28
]
29
}

Sample Output

1
{
2
"success": true,
3
"missing_columns": [],
4
"updated": 150
5
}