Whenever I use Summarize node and attempt to group by a field that is an object type, that field always gets converted to a string instead of retaining its object formating. So then I need to an extra step to convert it back.
Here’s a screenshot that illustrates what happens. In this case I’m appending one column (which retains its object type) and grouping by the other (which loses it):
And here’s the associated workflow:
{
“meta”: {
“instanceId”: “dd03d9cb498785120d8a498a063118e303fdd6c6c29744ddc567c10a9974bdce”
},
“nodes”: [
{
“parameters”: {},
“id”: “fe97f49f-317d-4a70-85a3-d9afc2eafcd2”,
“name”: “When clicking ‘Test workflow’”,
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
1060,
1480
]
},
{
“parameters”: {
“fieldsToSummarize”: {
“values”: [
{
“aggregation”: “append”,
“field”: “product”
}
]
},
“fieldsToSplitBy”: “company”,
“options”: {}
},
“id”: “98b0cd7a-4206-4eaf-9c7b-108be27dcb82”,
“name”: “Summarize”,
“type”: “n8n-nodes-base.summarize”,
“typeVersion”: 1,
“position”: [
1280,
1480
]
}
],
“connections”: {
“When clicking ‘Test workflow’”: {
“main”: [
[
{
“node”: “Summarize”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {
“When clicking ‘Test workflow’”: [
{
“company”: {
“company_id”: “C001”,
“company_name”: “Tech Innovators Ltd”
},
“product”: {
“product_id”: “P101”,
“product_name”: “Innovative Widget”
}
},
{
“company”: {
“company_id”: “C001”,
“company_name”: “Tech Innovators Ltd”
},
“product”: {
“product_id”: “P102”,
“product_name”: “Smart Gadget”
}
},
{
“company”: {
“company_id”: “C001”,
“company_name”: “Tech Innovators Ltd”
},
“product”: {
“product_id”: “P103”,
“product_name”: “Advanced Tool”
}
},
{
“company”: {
“company_id”: “C002”,
“company_name”: “Green Energy Solutions”
},
“product”: {
“product_id”: “P201”,
“product_name”: “Eco-friendly Battery”
}
},
{
“company”: {
“company_id”: “C002”,
“company_name”: “Green Energy Solutions”
},
“product”: {
“product_id”: “P202”,
“product_name”: “Solar Panel Pro”
}
},
{
“company”: {
“company_id”: “C002”,
“company_name”: “Green Energy Solutions”
},
“product”: {
“product_id”: “P203”,
“product_name”: “Wind Turbine Gen”
}
}
]
}
}
Feels like a bug to me?