Item lists node - Datatypes not the same

Describe the issue/error/question

So usually i read a spreadsheet file, but sometimes when it is modified (in excell) i get this error saying that the data type is not all the same and the list node cant do its job, some of the data in the json input are coloured green which is probably integer and others are blue which is probably just a string. see this screenshot below

now is there a way that i can transform all the data into string? I dont really need it to be a specific datatype for my workflow.

in excell ive tried to just change the cell datatype to text but it doesnt work. ive even tried to change the datatype to text and save it as a csv and it still does the same thing. can you suggest a solution?

It would be really nice if the node had an option just to ignore all datatypes and convert to string or something like that?

this is the example excel file here

What is the error message (if any)?

ERROR: ‘BatchNo’ isn’t always the same type

The type of this field varies between items

Details

Please share the workflow

Share the output returned by the last node

[
{
“SaleOrderNo”: “2822003354”,
“Invoiceno”: “000773059”,
“InvoiceDate”: 44844,
“StockCode”: “188015.1000”,
“Description”: “SOLVENT FOR VOLMETRIC KAR”,
“BatchNo”: “HX28507215”,
“Qty”: 1,
“ExpireDate”: 45716,
“Temptext”: “Room Temperature”,
“Customer”: “C0269”
},
{
“SaleOrderNo”: “2822003357”,
“Invoiceno”: “000773056”,
“InvoiceDate”: 44844,
“StockCode”: “4750-1L”,
“Description”: “GLYCEROL,OMNIPUR 1L”,
“BatchNo”: 162309,
“Qty”: 1,
“ExpireDate”: 45199,
“Temptext”: “+15C to +25C”,
“Customer”: “C0269”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2822003357”,
“Invoiceno”: “000773056”,
“InvoiceDate”: 44844,
“StockCode”: “105104.1000”,
“Description”: “DI-POTASSIUM HYDROGEN PHO”,
“BatchNo”: “AM1779504”,
“Qty”: 2,
“ExpireDate”: 46295,
“Temptext”: “+5C to +30C”,
“Customer”: “C0269”
},
{
“SaleOrderNo”: “2822003357”,
“Invoiceno”: “000773056”,
“InvoiceDate”: 44844,
“StockCode”: 100264.1,
“Description”: “FORMIC ACID 98-100% GR AC”,
“BatchNo”: “K53863164”,
“Qty”: 1,
“ExpireDate”: 46326,
“Temptext”: “+15C to +25C”,
“Customer”: “C0269”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2822003358”,
“Invoiceno”: “000773058”,
“InvoiceDate”: 44844,
“StockCode”: 104057.2511,
“Description”: “Glycerol (vegetable origi”,
“BatchNo”: “K54144157”,
“Qty”: 1,
“ExpireDate”: 45351,
“Temptext”: “+5C to +30C”,
“Customer”: “C0269”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2822003358”,
“Invoiceno”: “000773058”,
“InvoiceDate”: 44844,
“StockCode”: “104057.2511”,
“Description”: “Glycerol (vegetable origi”,
“BatchNo”: “K54144157”,
“Qty”: 1,
“ExpireDate”: 45351,
“Temptext”: “+5C to +30C”,
“Customer”: “C0269”
},
{
“SaleOrderNo”: “1222000758”,
“Invoiceno”: “000773005”,
“InvoiceDate”: 44844,
“StockCode”: “107734.2500”,
“Description”: “Silica gel 60 (0.063-0.20”,
“BatchNo”: “TA5227034”,
“Qty”: 2,
“ExpireDate”: 48244,
“Temptext”: “No Restrictions”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2222001621”,
“Invoiceno”: “000773066”,
“InvoiceDate”: 44844,
“StockCode”: “D9132-1G”,
“Description”: “2,2-Diphenyl-1-picrylhydr”,
“BatchNo”: “0000136786”,
“Qty”: 1,
“ExpireDate”: 2958465,
“Temptext”: “+2C to +8C”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2222001621”,
“Invoiceno”: “000773066”,
“InvoiceDate”: 44844,
“StockCode”: “109001.0100”,
“Description”: “FOLIN-CIOCALTEU’S PHENOL”,
“BatchNo”: “HC28583601”,
“Qty”: 1,
“ExpireDate”: 46538,
“Temptext”: “Room Temperature”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “12-348”,
“Description”: “Goat Anti-Rabbit IgG Anti”,
“BatchNo”: 3869528,
“Qty”: 1,
“ExpireDate”: 2958101,
“Temptext”: “-20C”,
“Customer”: “C0227”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “AGX811”,
“Description”: “SARS-CoV-2 Nucleoprotein”,
“BatchNo”: “Q3485632”,
“Qty”: 1,
“ExpireDate”: 2958101,
“Temptext”: “-10C to -25C”,
“Customer”: “C0227”,
“__EMPTY”: “ไม่มี coa”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “AGX818”,
“Description”: “SARS-CoV-2 Spike Protein”,
“BatchNo”: “3901413”,
“Qty”: 1,
“ExpireDate”: 2958101,
“Temptext”: “-10C to -25C”,
“Customer”: “C0227”,
“__EMPTY”: “ไม่มี coa”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “02-102”,
“Description”: “ENDOTHELIAL C.G.S. (ECGS)”,
“BatchNo”: 3859019,
“Qty”: 1,
“ExpireDate”: 2958101,
“Temptext”: “-20C”,
“Customer”: “C0227”,
“__EMPTY”: “ไม่มี coa”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “535140-1ML”,
“Description”: “Protease Inhibitor Cockta”,
“BatchNo”: 3867065,
“Qty”: 1,
“ExpireDate”: 2958101,
“Temptext”: “-20C”,
“Customer”: “C0227”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “QIA58-1000TEST”,
“Description”: “BrdU Cell Proliferation A”,
“BatchNo”: 3912082,
“Qty”: 1,
“ExpireDate”: 2958465,
“Temptext”: “-20C”,
“Customer”: “C0227”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2422002267”,
“Invoiceno”: “000773004”,
“InvoiceDate”: 44844,
“StockCode”: “COOL PACK_RS”,
“Description”: “Cold chain items charges”,
“BatchNo”: " ",
“Qty”: 1,
“ExpireDate”: 2958465,
“Temptext”: “”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2422002419”,
“Invoiceno”: “000773049”,
“InvoiceDate”: 44844,
“StockCode”: “4.86505.1000”,
“Description”: “STERILE PURIFIED WATER”,
“BatchNo”: 16522002,
“Qty”: 2,
“ExpireDate”: 45800,
“Temptext”: “+15C to +25C”,
“Customer”: “C0227”,
“__EMPTY”: “ปริ้นได้”
},
{
“SaleOrderNo”: “2422002419”,
“Invoiceno”: “000773049”,
“InvoiceDate”: 44844,
“StockCode”: “94964-500UL”,
“Description”: “BLUEYE PRESTAINED PROTEIN”,
“BatchNo”: “BCCH1579”,
“Qty”: 1,
“ExpireDate”: 2958465,
“Temptext”: “-20C to 0C”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2422002419”,
“Invoiceno”: “000773049”,
“InvoiceDate”: 44844,
“StockCode”: “A7250-5G”,
“Description”: “N-ACETYL-L-CYSTEINE SIGMA”,
“BatchNo”: “WXBD7044V”,
“Qty”: 1,
“ExpireDate”: 45657,
“Temptext”: “+2C to +8C”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2422002420”,
“Invoiceno”: “000773054”,
“InvoiceDate”: 44844,
“StockCode”: “103792.1000”,
“Description”: “AMMONIUM IRON(II) SULFATE”,
“BatchNo”: “K53203092”,
“Qty”: 1,
“ExpireDate”: 45382,
“Temptext”: “+15C to +25C”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2422002420”,
“Invoiceno”: “000773054”,
“InvoiceDate”: 44844,
“StockCode”: “101201.1000”,
“Description”: “AMMONIUM PEROXODISULFATE”,
“BatchNo”: “K53974701”,
“Qty”: 1,
“ExpireDate”: 45291,
“Temptext”: “+2C to +25C”,
“Customer”: “C0227”
},
{
“SaleOrderNo”: “2422002421”,
“Invoiceno”: “000773051”,
“InvoiceDate”: 44844,
“StockCode”: “415324-50G”,
“Description”: “N-ISOPROPYLACRYLAMIDE, 97”,
“BatchNo”: “MKCQ1739”,
“Qty”: 1,
“ExpireDate”: 2958465,
“Temptext”: “Room Temperature”,
“Customer”: “C0227”,
“__EMPTY”: “ปริ้นได้”
}
]

Information on your n8n setup

-Latest version 196 on a docker container

Hi @Josh-Ghazi,

Defining an intermediate Set node that converts the BatchNo and StockCode fields to a string is enough for the workflow to work.

Below is the modified workflow:

:wink:

3 Likes


I still get this because some of the fields dont have a batch number which makes an empty field and throws the some fields are empty error,

Is there anyway to make the node not behave so explicitly (strict on data)?

Hello again,

The StockCode_String field appears as missing because in your Item list node you have indicated StockCode_string, when in the Set node the StockCode_String field has been set.

1 Like

Oh dear, what a silly mistake, thank you so much!

Sorry for the inconsistency in naming the fields. In many occasions, n8n errors are caused by these details… :sweat:

I’m glad it worked for you. :wink: